pub struct DrainedChild {
pub parent_type_id: TypeId,
pub parent_entry_idx: usize,
pub child: Box<dyn Any + Send + Sync>,
pub child_type_id: TypeId,
pub fk_target_type_id: TypeId,
pub through_table: Option<String>,
pub through_parent_fk_col: Option<String>,
pub through_child_fk_col: Option<String>,
}Expand description
A child entity drained from a principal’s HasMany navigation, with the metadata needed to fixup its FK after the principal’s PK is backfilled.
Fields§
§parent_type_id: TypeIdThe principal entity’s TypeId (e.g. Blog).
parent_entry_idx: usizeIndex of the principal entry in its DbSet (for PK lookup after INSERT).
child: Box<dyn Any + Send + Sync>The drained child entity, type-erased.
child_type_id: TypeIdThe child entity’s TypeId (e.g. Post).
fk_target_type_id: TypeIdThe FK target type for set_foreign_key (the principal type).
through_table: Option<String>M2M only: the join table name. None for one-to-many.
through_parent_fk_col: Option<String>M2M only: FK column on the join table pointing to the principal.
through_child_fk_col: Option<String>M2M only: FK column on the join table pointing to the child.
Auto Trait Implementations§
impl !RefUnwindSafe for DrainedChild
impl !UnwindSafe for DrainedChild
impl Freeze for DrainedChild
impl Send for DrainedChild
impl Sync for DrainedChild
impl Unpin for DrainedChild
impl UnsafeUnpin for DrainedChild
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