Enum LoadChildrenOutput

Source
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§

Source§

impl<ChildModel: Debug, JoinModel: Debug> Debug for LoadChildrenOutput<ChildModel, JoinModel>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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>
where ChildModel: Send, JoinModel: Send,

§

impl<ChildModel, JoinModel> Sync for LoadChildrenOutput<ChildModel, JoinModel>
where ChildModel: Sync, JoinModel: Sync,

§

impl<ChildModel, JoinModel> Unpin for LoadChildrenOutput<ChildModel, JoinModel>
where ChildModel: Unpin, JoinModel: Unpin,

§

impl<ChildModel, JoinModel> UnwindSafe for LoadChildrenOutput<ChildModel, JoinModel>
where ChildModel: UnwindSafe, JoinModel: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.