pub struct ImportGraph {
pub nodes: HashSet<String>,
pub edges: Vec<(String, String)>,
}Expand description
Import graph extracted from cargo-modules.
Contains nodes (module paths) and edges (dependencies between modules).
Fields§
§nodes: HashSet<String>Module paths that exist in the crate
edges: Vec<(String, String)>Dependencies: (from_module, to_module)
Implementations§
Source§impl ImportGraph
impl ImportGraph
Sourcepub fn has_dependency(&self, from: &str, to: &str) -> bool
pub fn has_dependency(&self, from: &str, to: &str) -> bool
Check if a dependency exists from one module to another.
Sourcepub fn get_dependencies(&self, module: &str) -> Vec<String>
pub fn get_dependencies(&self, module: &str) -> Vec<String>
Get all dependencies of a module.
Trait Implementations§
Source§impl Clone for ImportGraph
impl Clone for ImportGraph
Source§fn clone(&self) -> ImportGraph
fn clone(&self) -> ImportGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImportGraph
impl Debug for ImportGraph
Source§impl Default for ImportGraph
impl Default for ImportGraph
Source§fn default() -> ImportGraph
fn default() -> ImportGraph
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ImportGraph
impl RefUnwindSafe for ImportGraph
impl Send for ImportGraph
impl Sync for ImportGraph
impl Unpin for ImportGraph
impl UnsafeUnpin for ImportGraph
impl UnwindSafe for ImportGraph
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