pub enum LoadChildrenOutput<ChildModel, JoinModel = ()> {
ChildModels(Vec<ChildModel>),
ChildAndJoinModels(Vec<(ChildModel, JoinModel)>),
}
Expand description
The result of loading child models.
HasOne
, OptionHasOne
, HasMany
can return the child models directly because
the model has the foreign key. However for HasManyThrough
neither the parent or child
model has any of the foreign keys. Only the join model does. So we have to include those in the
result.
Unless you’re customizing EagerLoadChildrenOfType
you shouldn’t have to worry about this.
Variants§
ChildModels(Vec<ChildModel>)
Child models were loaded.
ChildAndJoinModels(Vec<(ChildModel, JoinModel)>)
Child models along with the respective join model was loaded.
Trait Implementations§
Auto Trait Implementations§
impl<ChildModel, JoinModel> Freeze for LoadChildrenOutput<ChildModel, JoinModel>
impl<ChildModel, JoinModel> RefUnwindSafe for LoadChildrenOutput<ChildModel, JoinModel>where
ChildModel: RefUnwindSafe,
JoinModel: RefUnwindSafe,
impl<ChildModel, JoinModel> Send for LoadChildrenOutput<ChildModel, JoinModel>
impl<ChildModel, JoinModel> Sync for LoadChildrenOutput<ChildModel, JoinModel>
impl<ChildModel, JoinModel> Unpin for LoadChildrenOutput<ChildModel, JoinModel>
impl<ChildModel, JoinModel> UnwindSafe for LoadChildrenOutput<ChildModel, JoinModel>where
ChildModel: UnwindSafe,
JoinModel: 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