pub struct Resolve { /* private fields */ }
Expand description
Represents a fully-resolved package dependency graph. Each node in the graph is a package and edges represent dependencies between packages.
Each instance of Resolve
also understands the full set of features used
for each package.
Implementations
sourceimpl Resolve
impl Resolve
pub fn new(
graph: Graph<PackageId, HashSet<Dependency>>,
replacements: HashMap<PackageId, PackageId>,
features: HashMap<PackageId, Vec<InternedString>>,
checksums: HashMap<PackageId, Option<String>>,
metadata: Metadata,
unused_patches: Vec<PackageId>,
version: ResolveVersion,
summaries: HashMap<PackageId, Summary>
) -> Resolve
sourcepub fn path_to_top<'a>(
&'a self,
pkg: &'a PackageId
) -> Vec<(&'a PackageId, Option<&'a HashSet<Dependency>>)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn path_to_top<'a>(
&'a self,
pkg: &'a PackageId
) -> Vec<(&'a PackageId, Option<&'a HashSet<Dependency>>)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Resolves one of the paths from the given dependent package up to the root.
pub fn register_used_patches(&mut self, patches: &[Summary])
pub fn merge_from(&mut self, previous: &Resolve) -> CargoResult<()>
pub fn contains<Q: ?Sized>(&self, k: &Q) -> bool where
PackageId: Borrow<Q>,
Q: Ord + Eq,
pub fn sort(&self) -> Vec<PackageId>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn iter(&self) -> impl Iterator<Item = PackageId> + '_
pub fn deps(
&self,
pkg: PackageId
) -> impl Iterator<Item = (PackageId, &HashSet<Dependency>)>
pub fn deps_not_replaced(
&self,
pkg: PackageId
) -> impl Iterator<Item = (PackageId, &HashSet<Dependency>)>
pub fn replacement(&self, pkg: PackageId) -> Option<PackageId>
pub fn replacements(&self) -> &HashMap<PackageId, PackageId>
pub fn features(&self, pkg: PackageId) -> &[InternedString]
sourcepub fn features_clone(&self) -> HashMap<PackageId, Vec<InternedString>>
pub fn features_clone(&self) -> HashMap<PackageId, Vec<InternedString>>
This is only here for legacy support, it will be removed when switching to the new feature resolver.
pub fn is_public_dep(&self, pkg: PackageId, dep: PackageId) -> bool
pub fn query(&self, spec: &str) -> CargoResult<PackageId>
pub fn specs_to_ids(
&self,
specs: &[PackageIdSpec]
) -> CargoResult<Vec<PackageId>>
pub fn unused_patches(&self) -> &[PackageId]
pub fn checksums(&self) -> &HashMap<PackageId, Option<String>>
pub fn metadata(&self) -> &Metadata
pub fn extern_crate_name(
&self,
from: PackageId,
to: PackageId,
to_target: &Target
) -> CargoResult<String>
sourcepub fn version(&self) -> ResolveVersion
pub fn version(&self) -> ResolveVersion
Returns the version of the encoding that’s being used for this lock file.
pub fn set_version(&mut self, version: ResolveVersion)
pub fn summary(&self, pkg_id: PackageId) -> &Summary
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Resolve
impl !Send for Resolve
impl !Sync for Resolve
impl Unpin for Resolve
impl UnwindSafe for Resolve
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more