pub struct ModuleGraph {
pub order: Vec<ModulePath>,
pub imports: BTreeMap<ModulePath, Vec<ScannedImport>>,
}Expand description
The resolved dependency graph: every module’s scanned imports plus the deterministic topological order (dependencies first, entry last).
Fields§
§order: Vec<ModulePath>Topological order, dependencies before dependents. With no cycles this always contains every module of the set exactly once.
imports: BTreeMap<ModulePath, Vec<ScannedImport>>Every scanned import per module — including the refused forms, so downstream diagnostics fire with real locations.
Implementations§
Source§impl ModuleGraph
impl ModuleGraph
Sourcepub fn build(set: &ModuleSet) -> Result<ModuleGraph, ModuleError>
pub fn build(set: &ModuleSet) -> Result<ModuleGraph, ModuleError>
Build + topologically sort. Refuses cycles with axon-T955,
naming the full cycle path.
Sourcepub fn dependencies_of(&self, module: &ModulePath) -> Vec<&ModulePath>
pub fn dependencies_of(&self, module: &ModulePath) -> Vec<&ModulePath>
The resolvable dependency paths of module (deterministic order).
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