pub struct DependencyResolver { /* private fields */ }Implementations§
Source§impl DependencyResolver
impl DependencyResolver
pub fn new() -> Self
Sourcepub fn add_dependency(&mut self, dependency: Dependency)
pub fn add_dependency(&mut self, dependency: Dependency)
Add a dependency relationship
Sourcepub fn add_node(&mut self, node: DependencyNode)
pub fn add_node(&mut self, node: DependencyNode)
Add a node without dependencies
Sourcepub fn resolve_build_order(
&self,
) -> Result<Vec<DependencyNode>, DependencyError>
pub fn resolve_build_order( &self, ) -> Result<Vec<DependencyNode>, DependencyError>
Resolve dependencies and return them in topological order
Sourcepub fn get_dependencies_for(&self, node: &DependencyNode) -> Vec<&Dependency>
pub fn get_dependencies_for(&self, node: &DependencyNode) -> Vec<&Dependency>
Get dependencies for a specific node
Sourcepub fn get_dependents_of(&self, node: &DependencyNode) -> Vec<&Dependency>
pub fn get_dependents_of(&self, node: &DependencyNode) -> Vec<&Dependency>
Get reverse dependencies (dependents) for a specific node
Sourcepub fn validate_dependencies(&self) -> Result<(), DependencyError>
pub fn validate_dependencies(&self) -> Result<(), DependencyError>
Check if there are any unresolved dependencies
Sourcepub fn generate_dot_graph(&self) -> String
pub fn generate_dot_graph(&self) -> String
Generate a visual representation of the dependency graph
Sourcepub fn generate_text_graph(&self) -> String
pub fn generate_text_graph(&self) -> String
Generate a text-based visualization of dependencies
Sourcepub fn group_by_type(&self) -> HashMap<DependencyNodeType, Vec<DependencyNode>>
pub fn group_by_type(&self) -> HashMap<DependencyNodeType, Vec<DependencyNode>>
Group nodes by their type for organized code generation
Sourcepub fn get_dependency_depth(&self, node: &DependencyNode) -> usize
pub fn get_dependency_depth(&self, node: &DependencyNode) -> usize
Get the dependency depth for a node (longest path to a leaf)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DependencyResolver
impl RefUnwindSafe for DependencyResolver
impl Send for DependencyResolver
impl Sync for DependencyResolver
impl Unpin for DependencyResolver
impl UnwindSafe for DependencyResolver
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