pub struct IncludeList<'db, M, C, Key, NI = ()> {
pub get: fn(&M) -> Key,
pub set: fn(&mut M, Related<Vec<C>>),
pub child_key: Column<C, Key>,
pub child_key_get: fn(&C) -> Key,
pub filter: Filter<C>,
pub order: Vec<OrderBy<C>>,
pub limit: Option<u64>,
pub nested: NI,
/* private fields */
}Expand description
Include a one-to-many relation (parent has many children).
Fields§
§get: fn(&M) -> KeyExtract the join key from the parent.
set: fn(&mut M, Related<Vec<C>>)Attach the loaded children to the parent.
child_key: Column<C, Key>The child column that matches the parent key.
child_key_get: fn(&C) -> KeyExtract the join key from a child row.
filter: Filter<C>Optional extra filter on the child rows.
order: Vec<OrderBy<C>>Ordering for the child rows.
limit: Option<u64>Optional per-child limit (take).
nested: NINested includes on the child.
Implementations§
Source§impl<'db, M, C, Key> IncludeList<'db, M, C, Key, ()>
impl<'db, M, C, Key> IncludeList<'db, M, C, Key, ()>
Source§impl<'db, M, C, Key, NI> IncludeList<'db, M, C, Key, NI>
impl<'db, M, C, Key, NI> IncludeList<'db, M, C, Key, NI>
Sourcepub fn include<J: IncludeSet<C>>(
self,
include: J,
) -> IncludeList<'db, M, C, Key, J>
pub fn include<J: IncludeSet<C>>( self, include: J, ) -> IncludeList<'db, M, C, Key, J>
Adds a nested include on the child.
Trait Implementations§
Source§impl<'db, M, C, Key, NI> Clone for IncludeList<'db, M, C, Key, NI>where
NI: Clone,
impl<'db, M, C, Key, NI> Clone for IncludeList<'db, M, C, Key, NI>where
NI: Clone,
Source§impl<'db, M, C, Key, NI> Debug for IncludeList<'db, M, C, Key, NI>where
NI: Debug,
impl<'db, M, C, Key, NI> Debug for IncludeList<'db, M, C, Key, NI>where
NI: Debug,
Source§impl<'db, M, C, Key, NI> IncludeSet<M> for IncludeList<'db, M, C, Key, NI>
impl<'db, M, C, Key, NI> IncludeSet<M> for IncludeList<'db, M, C, Key, NI>
Auto Trait Implementations§
impl<'db, M, C, Key, NI> Freeze for IncludeList<'db, M, C, Key, NI>
impl<'db, M, C, Key, NI> RefUnwindSafe for IncludeList<'db, M, C, Key, NI>where
fn(&M) -> Key: RefUnwindSafe,
fn(&mut M, Related<Vec<C>>): RefUnwindSafe,
Column<C, Key>: RefUnwindSafe,
fn(&C) -> Key: RefUnwindSafe,
Filter<C>: RefUnwindSafe,
Vec<OrderBy<C>>: RefUnwindSafe,
NI: RefUnwindSafe,
impl<'db, M, C, Key, NI> Send for IncludeList<'db, M, C, Key, NI>
impl<'db, M, C, Key, NI> Sync for IncludeList<'db, M, C, Key, NI>
impl<'db, M, C, Key, NI> Unpin for IncludeList<'db, M, C, Key, NI>
impl<'db, M, C, Key, NI> UnsafeUnpin for IncludeList<'db, M, C, Key, NI>where
fn(&M) -> Key: UnsafeUnpin,
fn(&mut M, Related<Vec<C>>): UnsafeUnpin,
Column<C, Key>: UnsafeUnpin,
fn(&C) -> Key: UnsafeUnpin,
Filter<C>: UnsafeUnpin,
Vec<OrderBy<C>>: UnsafeUnpin,
NI: UnsafeUnpin,
impl<'db, M, C, Key, NI> UnwindSafe for IncludeList<'db, M, C, Key, NI>where
fn(&M) -> Key: UnwindSafe,
fn(&mut M, Related<Vec<C>>): UnwindSafe,
Column<C, Key>: UnwindSafe,
fn(&C) -> Key: UnwindSafe,
Filter<C>: UnwindSafe,
Vec<OrderBy<C>>: UnwindSafe,
NI: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more