pub struct Resolver { /* private fields */ }Expand description
Main dependency resolver.
Implementations§
Source§impl Resolver
impl Resolver
Sourcepub fn with_options(options: ResolveOptions) -> Self
pub fn with_options(options: ResolveOptions) -> Self
Creates a new resolver with custom options.
Sourcepub fn with_workspace_packages(self, packages: HashMap<String, String>) -> Self
pub fn with_workspace_packages(self, packages: HashMap<String, String>) -> Self
Sets the workspace packages for resolution.
Sourcepub async fn resolve(
&mut self,
dependencies: &HashMap<String, Dependency>,
dev_dependencies: &HashMap<String, Dependency>,
) -> Result<ResolveResult>
pub async fn resolve( &mut self, dependencies: &HashMap<String, Dependency>, dev_dependencies: &HashMap<String, Dependency>, ) -> Result<ResolveResult>
Resolves dependencies from a Nargo.toml configuration.
Sourcepub async fn resolve_single(
&mut self,
name: &str,
dependency: &Dependency,
) -> Result<DependencyNode>
pub async fn resolve_single( &mut self, name: &str, dependency: &Dependency, ) -> Result<DependencyNode>
Resolves a single dependency.
Sourcepub fn topological_sort(
&self,
graph: &DependencyGraph,
) -> Result<Vec<DependencyNode>>
pub fn topological_sort( &self, graph: &DependencyGraph, ) -> Result<Vec<DependencyNode>>
Performs topological sort on resolved dependencies.
Sourcepub fn detect_cycles(&self, graph: &DependencyGraph) -> Option<Vec<String>>
pub fn detect_cycles(&self, graph: &DependencyGraph) -> Option<Vec<String>>
Detects circular dependencies.
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clears the resolver cache.
Sourcepub fn cache(&self) -> &HashMap<String, DependencyNode>
pub fn cache(&self) -> &HashMap<String, DependencyNode>
Returns the resolved cache.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Resolver
impl RefUnwindSafe for Resolver
impl Send for Resolver
impl Sync for Resolver
impl Unpin for Resolver
impl UnsafeUnpin for Resolver
impl UnwindSafe for Resolver
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