pub struct HasMany<From, To, Relation = (), Key = i64> { /* private fields */ }Expand description
A typed reverse foreign-key relation from one model to many related models.
Implementations§
Source§impl<M: Model, R: Model, Relation, Key: ForeignKeyValue<M::PrimaryKey>> HasMany<M, R, Relation, Key>
impl<M: Model, R: Model, Relation, Key: ForeignKeyValue<M::PrimaryKey>> HasMany<M, R, Relation, Key>
pub fn prefetch<C, ChildRelation, InnerKey: ForeignKeyValue<R::PrimaryKey>>( self, inner: HasMany<R, C, ChildRelation, InnerKey>, ) -> NestedPrefetchPlan<M, R, Relation, C, ChildRelation, Key, InnerKey>
Trait Implementations§
Source§impl<From: Clone, To: Clone, Relation: Clone, Key: Clone> Clone for HasMany<From, To, Relation, Key>
impl<From: Clone, To: Clone, Relation: Clone, Key: Clone> Clone for HasMany<From, To, Relation, Key>
impl<From: Copy, To: Copy, Relation: Copy, Key: Copy> Copy for HasMany<From, To, Relation, Key>
Source§impl<From: Debug, To: Debug, Relation: Debug, Key: Debug> Debug for HasMany<From, To, Relation, Key>
impl<From: Debug, To: Debug, Relation: Debug, Key: Debug> Debug for HasMany<From, To, Relation, Key>
Source§impl<M: Model, R, Relation, Key: ForeignKeyValue<M::PrimaryKey>> PrefetchRelation<M> for HasMany<M, R, Relation, Key>
impl<M: Model, R, Relation, Key: ForeignKeyValue<M::PrimaryKey>> PrefetchRelation<M> for HasMany<M, R, Relation, Key>
type Query = PrefetchRelatedQuery<M, R, Relation, Key>
fn into_query(self, query: SelectQuery<M>) -> Self::Query
Auto Trait Implementations§
impl<From, To, Relation, Key> Forget for HasMany<From, To, Relation, Key>
impl<From, To, Relation, Key> Freeze for HasMany<From, To, Relation, Key>
impl<From, To, Relation, Key> Move for HasMany<From, To, Relation, Key>
impl<From, To, Relation, Key> RefUnwindSafe for HasMany<From, To, Relation, Key>
impl<From, To, Relation, Key> Send for HasMany<From, To, Relation, Key>
impl<From, To, Relation, Key> Sync for HasMany<From, To, Relation, Key>
impl<From, To, Relation, Key> Unpin for HasMany<From, To, Relation, Key>
impl<From, To, Relation, Key> UnsafeUnpin for HasMany<From, To, Relation, Key>
impl<From, To, Relation, Key> UnwindSafe for HasMany<From, To, Relation, Key>
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