pub struct DependencyGraph { /* private fields */ }Implementations§
Source§impl DependencyGraph
impl DependencyGraph
Sourcepub fn build(metas: &HashMap<TypeId, EntityTypeMeta>) -> Self
pub fn build(metas: &HashMap<TypeId, EntityTypeMeta>) -> Self
Builds the graph from entity metadata. Edges come from HasMany and
ManyToMany navigations: related_type_id (child) depends on type_id
(principal).
Sourcepub fn topological_sort(&self) -> Vec<TypeId>
pub fn topological_sort(&self) -> Vec<TypeId>
Kahn’s algorithm topological sort: principals first, dependents after. Self-edges (type depends on itself) are excluded from in-degree counting — same-type instance ordering is handled by the cascade drain + fixup pipeline.
Sourcepub fn deletion_order(&self) -> Vec<TypeId>
pub fn deletion_order(&self) -> Vec<TypeId>
Deletion order: reverse topological (dependents before principals).
Auto Trait Implementations§
impl Freeze for DependencyGraph
impl RefUnwindSafe for DependencyGraph
impl Send for DependencyGraph
impl Sync for DependencyGraph
impl Unpin for DependencyGraph
impl UnsafeUnpin for DependencyGraph
impl UnwindSafe for DependencyGraph
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