pub struct Loaded<M, R = ()>where
M: Model,{
pub items: Vec<M>,
pub _relations: PhantomData<R>,
}Expand description
Wrapper for eager-loaded query results. Generic over the loading shape;
in practice a concrete LoadedUserWithPosts type is generated per derive.
Fields§
§items: Vec<M>§_relations: PhantomData<R>Implementations§
Auto Trait Implementations§
impl<M, R> Freeze for Loaded<M, R>
impl<M, R> RefUnwindSafe for Loaded<M, R>where
R: RefUnwindSafe,
M: RefUnwindSafe,
impl<M, R> Send for Loaded<M, R>where
R: Send,
impl<M, R> Sync for Loaded<M, R>where
R: Sync,
impl<M, R> Unpin for Loaded<M, R>where
R: Unpin,
impl<M, R> UnsafeUnpin for Loaded<M, R>
impl<M, R> UnwindSafe for Loaded<M, R>where
R: UnwindSafe,
M: 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
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