pub struct ModuleGraph {
pub nodes: Vec<KnowledgeNode>,
pub edges: Vec<Edge>,
pub modules: HashMap<PathBuf, ModuleInfo>,
/* private fields */
}Expand description
The complete module structure analysis result.
Fields§
§nodes: Vec<KnowledgeNode>Knowledge nodes representing each module (Fact nature).
edges: Vec<Edge>Edges: DependsOn (import relationships) and PartOf (hierarchy).
modules: HashMap<PathBuf, ModuleInfo>Module info indexed by module path (for querying).
Implementations§
Source§impl ModuleGraph
impl ModuleGraph
Sourcepub fn dependencies_of(&self, module_path: &Path) -> Vec<&PathBuf>
pub fn dependencies_of(&self, module_path: &Path) -> Vec<&PathBuf>
Find all modules that the given module depends on (outgoing DependsOn edges).
Sourcepub fn dependents_of(&self, module_path: &Path) -> Vec<&PathBuf>
pub fn dependents_of(&self, module_path: &Path) -> Vec<&PathBuf>
Find all modules that depend on the given module (incoming DependsOn edges).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModuleGraph
impl RefUnwindSafe for ModuleGraph
impl Send for ModuleGraph
impl Sync for ModuleGraph
impl Unpin for ModuleGraph
impl UnsafeUnpin for ModuleGraph
impl UnwindSafe for ModuleGraph
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