pub struct DependencyResolver { /* private fields */ }Expand description
Dependency resolver for handling complex dependency graphs
Implementations§
Source§impl DependencyResolver
impl DependencyResolver
Sourcepub fn new(registry: Box<dyn PackageRegistry>) -> Self
pub fn new(registry: Box<dyn PackageRegistry>) -> Self
Create a new dependency resolver
Sourcepub fn with_strategy(self, strategy: ResolutionStrategy) -> Self
pub fn with_strategy(self, strategy: ResolutionStrategy) -> Self
Set resolution strategy
Sourcepub fn with_max_depth(self, max_depth: usize) -> Self
pub fn with_max_depth(self, max_depth: usize) -> Self
Set maximum dependency depth
Sourcepub fn with_parallel_resolution(self, parallel: bool) -> Self
pub fn with_parallel_resolution(self, parallel: bool) -> Self
Enable parallel resolution
Sourcepub fn resolve_dependencies(
&self,
package: &Package,
) -> Result<Vec<ResolvedDependency>>
pub fn resolve_dependencies( &self, package: &Package, ) -> Result<Vec<ResolvedDependency>>
Resolve dependencies for a package
Sourcepub fn install_dependencies(
&self,
resolved: &mut [ResolvedDependency],
install_dir: &Path,
) -> Result<()>
pub fn install_dependencies( &self, resolved: &mut [ResolvedDependency], install_dir: &Path, ) -> Result<()>
Install resolved dependencies
Sourcepub fn build_dependency_graph(
&self,
package: &Package,
) -> Result<DependencyGraph>
pub fn build_dependency_graph( &self, package: &Package, ) -> Result<DependencyGraph>
Build dependency graph for analysis
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 UnsafeUnpin 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more