pub struct SpecGraph { /* private fields */ }Expand description
A directed acyclic graph of spec files, built from requires: references.
Handles cross-file dependencies, detects circular references, and provides topological ordering for execution.
Implementations§
Source§impl SpecGraph
impl SpecGraph
Sourcepub fn from_roots(roots: &[PathBuf]) -> Result<Self, Vec<ParseError>>
pub fn from_roots(roots: &[PathBuf]) -> Result<Self, Vec<ParseError>>
Discover and parse all spec files from the given root directories.
Builds the dependency graph from requires: metadata.
Sourcepub fn topological_order(&self) -> Vec<&Spec>
pub fn topological_order(&self) -> Vec<&Spec>
Specs in topological order (dependencies before dependents). Uses Kahn’s algorithm.
Sourcepub fn get_by_path(&self, path: &Path) -> Option<&Spec>
pub fn get_by_path(&self, path: &Path) -> Option<&Spec>
Look up a spec by its source file path.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpecGraph
impl RefUnwindSafe for SpecGraph
impl Send for SpecGraph
impl Sync for SpecGraph
impl Unpin for SpecGraph
impl UnsafeUnpin for SpecGraph
impl UnwindSafe for SpecGraph
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