pub struct Loaded<T> { /* private fields */ }Available on crate features
model-mysql or model-postgres or model-sqlite only.Expand description
A model with the relations QueryBuilder::with
loaded for it. Derefs to the model.
Implementations§
Source§impl<T> Loaded<T>where
T: Model,
impl<T> Loaded<T>where
T: Model,
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
The model, relations dropped.
The rows of relation (empty when there are none, or when the query
didn’t load it — see is_loaded).
Sourcepub fn one<R>(&self, relation: &Relation<T, R>) -> Option<&R>where
R: Model + 'static,
pub fn one<R>(&self, relation: &Relation<T, R>) -> Option<&R>where
R: Model + 'static,
The first row of relation: the one of a belongs_to / has_one.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Loaded<T>
impl<T> !UnwindSafe for Loaded<T>
impl<T> Freeze for Loaded<T>where
T: Freeze,
impl<T> Send for Loaded<T>where
T: Send,
impl<T> Sync for Loaded<T>where
T: Sync,
impl<T> Unpin for Loaded<T>where
T: Unpin,
impl<T> UnsafeUnpin for Loaded<T>where
T: UnsafeUnpin,
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Available on crate feature
map-response-body only.Apply a transformation to the response body. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
Available on crate feature
trace only.High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
Available on crate feature
trace only.High level tracing that classifies responses using gRPC headers. Read more