pub struct ResolvedFeatures { /* private fields */ }
Expand description
Set of all activated features for all packages in the resolve graph.
Implementations
sourceimpl ResolvedFeatures
impl ResolvedFeatures
sourcepub fn activated_features(
&self,
pkg_id: PackageId,
features_for: FeaturesFor
) -> Vec<InternedString>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn activated_features(
&self,
pkg_id: PackageId,
features_for: FeaturesFor
) -> Vec<InternedString>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns the list of features that are enabled for the given package.
sourcepub fn is_dep_activated(
&self,
pkg_id: PackageId,
features_for: FeaturesFor,
dep_name: InternedString
) -> bool
pub fn is_dep_activated(
&self,
pkg_id: PackageId,
features_for: FeaturesFor,
dep_name: InternedString
) -> bool
Returns if the given dependency should be included.
This handles dependencies disabled via cfg
expressions and optional
dependencies which are not enabled.
sourcepub fn activated_features_unverified(
&self,
pkg_id: PackageId,
features_for: FeaturesFor
) -> Option<Vec<InternedString>>
pub fn activated_features_unverified(
&self,
pkg_id: PackageId,
features_for: FeaturesFor
) -> Option<Vec<InternedString>>
Variant of activated_features
that returns None
if this is
not a valid pkg_id/is_build combination. Used in places which do
not know which packages are activated (like cargo clean
).
sourcepub fn compare_legacy(&self, legacy: &ResolvedFeatures) -> FeatureDifferences
pub fn compare_legacy(&self, legacy: &ResolvedFeatures) -> FeatureDifferences
Compares the result against the original resolver behavior.
Used by cargo fix --edition
to display any differences.
Auto Trait Implementations
impl RefUnwindSafe for ResolvedFeatures
impl Send for ResolvedFeatures
impl Sync for ResolvedFeatures
impl Unpin for ResolvedFeatures
impl UnwindSafe for ResolvedFeatures
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