pub struct DependencyGraph { /* private fields */ }
Expand description
Dependency graph for tools
Implementations§
Source§impl DependencyGraph
impl DependencyGraph
Sourcepub fn get_tool(&self, tool_name: &str) -> Option<&DependencyNode>
pub fn get_tool(&self, tool_name: &str) -> Option<&DependencyNode>
Get a tool node
Sourcepub fn get_tool_mut(&mut self, tool_name: &str) -> Option<&mut DependencyNode>
pub fn get_tool_mut(&mut self, tool_name: &str) -> Option<&mut DependencyNode>
Get a mutable tool node
Sourcepub fn set_tool_available(
&mut self,
tool_name: &str,
available: bool,
version: Option<String>,
)
pub fn set_tool_available( &mut self, tool_name: &str, available: bool, version: Option<String>, )
Update tool availability
Sourcepub fn resolve_dependencies(
&mut self,
tool_name: &str,
) -> Result<ResolutionResult>
pub fn resolve_dependencies( &mut self, tool_name: &str, ) -> Result<ResolutionResult>
Resolve dependencies for a tool
Sourcepub fn get_dependents(&self, tool_name: &str) -> Vec<String>
pub fn get_dependents(&self, tool_name: &str) -> Vec<String>
Get all tools that depend on a given tool
Sourcepub fn get_dependencies(&self, tool_name: &str) -> Vec<String>
pub fn get_dependencies(&self, tool_name: &str) -> Vec<String>
Get direct dependencies of a tool
Sourcepub fn has_cycles(&mut self) -> bool
pub fn has_cycles(&mut self) -> bool
Check if the graph has cycles
Sourcepub fn get_install_order(&mut self, tools: &[String]) -> Result<Vec<String>>
pub fn get_install_order(&mut self, tools: &[String]) -> Result<Vec<String>>
Get tools in installation order (dependencies first)
Sourcepub fn get_stats(&self) -> GraphStats
pub fn get_stats(&self) -> GraphStats
Get statistics about the dependency graph
Trait Implementations§
Source§impl Clone for DependencyGraph
impl Clone for DependencyGraph
Source§fn clone(&self) -> DependencyGraph
fn clone(&self) -> DependencyGraph
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 DependencyGraph
impl Debug for DependencyGraph
Auto Trait Implementations§
impl Freeze for DependencyGraph
impl RefUnwindSafe for DependencyGraph
impl Send for DependencyGraph
impl Sync for DependencyGraph
impl Unpin for DependencyGraph
impl UnwindSafe for DependencyGraph
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