pub struct RelationLens<M, R> { /* private fields */ }Expand description
A relation field’s include, which loads it, paired with the function that reads the loaded relation off a record.
relation! builds one from a single field name, so the column that reads
the relation always declares its include:
RelationColumn::unscoped(relation!(Post.author), |_, a: &Author| a.name.clone());Implementations§
Trait Implementations§
Source§impl<M, R> Clone for RelationLens<M, R>
impl<M, R> Clone for RelationLens<M, R>
Source§fn clone(&self) -> RelationLens<M, R>
fn clone(&self) -> RelationLens<M, R>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<M, R> Freeze for RelationLens<M, R>
impl<M, R> RefUnwindSafe for RelationLens<M, R>
impl<M, R> Send for RelationLens<M, R>
impl<M, R> Sync for RelationLens<M, R>
impl<M, R> Unpin for RelationLens<M, R>
impl<M, R> UnsafeUnpin for RelationLens<M, R>
impl<M, R> UnwindSafe for RelationLens<M, R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more