pub struct DependencyGraph {
pub nodes: HashMap<u64, DependencyNode>,
}Fields§
§nodes: HashMap<u64, DependencyNode>Implementations§
Source§impl DependencyGraph
impl DependencyGraph
pub fn new() -> Self
pub fn add_level(&mut self, level_id: u64)
pub fn add_dependency( &mut self, from: u64, to: u64, edge_type: DependencyEdgeType, )
Sourcepub fn detect_cycles(&self) -> Option<Vec<u64>>
pub fn detect_cycles(&self) -> Option<Vec<u64>>
DFS-based cycle detection. Returns Some(cycle) if a cycle exists.
Sourcepub fn topological_sort(&self) -> Result<Vec<u64>, Vec<u64>>
pub fn topological_sort(&self) -> Result<Vec<u64>, Vec<u64>>
Topological sort (Kahn’s algorithm). Returns load order.
Sourcepub fn parallel_load_plan(&self) -> Vec<Vec<u64>>
pub fn parallel_load_plan(&self) -> Vec<Vec<u64>>
Plan parallel load batches based on dependency order
pub fn get_all_dependencies( &self, level_id: u64, include_optional: bool, ) -> HashSet<u64>
Trait Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.