pub struct DepGraphExt {
pub edges: Vec<ModuleDepExt>,
}Expand description
A module dependency graph.
Fields§
§edges: Vec<ModuleDepExt>All edges
Implementations§
Source§impl DepGraphExt
impl DepGraphExt
Sourcepub fn add(&mut self, dep: ModuleDepExt)
pub fn add(&mut self, dep: ModuleDepExt)
Add an edge.
Sourcepub fn direct_deps(&self, module: &str) -> Vec<&str>
pub fn direct_deps(&self, module: &str) -> Vec<&str>
Returns all direct dependencies of a module.
Sourcepub fn dependents(&self, module: &str) -> Vec<&str>
pub fn dependents(&self, module: &str) -> Vec<&str>
Returns all modules that depend on a given module.
Sourcepub fn has_self_import(&self) -> bool
pub fn has_self_import(&self) -> bool
Checks for cycles using DFS (simplified: just checks direct self-import).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DepGraphExt
impl RefUnwindSafe for DepGraphExt
impl Send for DepGraphExt
impl Sync for DepGraphExt
impl Unpin for DepGraphExt
impl UnsafeUnpin for DepGraphExt
impl UnwindSafe for DepGraphExt
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