pub struct DependencyGraph { /* private fields */ }Expand description
Represents the dependency graph for circular dependency detection
Implementations§
Source§impl DependencyGraph
impl DependencyGraph
Sourcepub fn add_edge(&mut self, parent: ScenarioReference, child: ScenarioReference)
pub fn add_edge(&mut self, parent: ScenarioReference, child: ScenarioReference)
Add a dependency edge from parent to child
Sourcepub fn detect_cycles(
&self,
start: &ScenarioReference,
) -> Result<(), Vec<ScenarioReference>>
pub fn detect_cycles( &self, start: &ScenarioReference, ) -> Result<(), Vec<ScenarioReference>>
Detect circular dependencies using depth-first search Returns Ok(()) if no cycles, or Err with the cycle path if a cycle is detected
Sourcepub fn format_cycle_error(cycle: &[ScenarioReference]) -> String
pub fn format_cycle_error(cycle: &[ScenarioReference]) -> String
Format a cycle path as a human-readable error message
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 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