pub struct ResolvedFeatures {
pub activated_features: ActivateMap,
pub activated_dependencies: ActivateMap,
pub opts: FeatureOpts,
}Expand description
Set of all activated features for all packages in the resolve graph.
Fields§
§activated_features: ActivateMap§activated_dependencies: ActivateMapOptional dependencies that should be built.
The value is the name_in_toml of the dependencies.
opts: FeatureOptsImplementations§
Source§impl ResolvedFeatures
impl ResolvedFeatures
Sourcepub fn activated_features(
&self,
pkg_id: PackageId,
features_for: FeaturesFor,
) -> Vec<InternedString>
pub fn activated_features( &self, pkg_id: PackageId, features_for: FeaturesFor, ) -> Vec<InternedString>
Returns the list of features that are enabled for the given package.
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 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 compare_legacy(&self, legacy: &ResolvedFeatures) -> DiffMap
pub fn compare_legacy(&self, legacy: &ResolvedFeatures) -> DiffMap
Compares the result against the original resolver behavior.
Used by cargo fix --edition to display any differences.
Auto Trait Implementations§
impl Freeze for ResolvedFeatures
impl RefUnwindSafe for ResolvedFeatures
impl Send for ResolvedFeatures
impl Sync for ResolvedFeatures
impl Unpin for ResolvedFeatures
impl UnwindSafe for ResolvedFeatures
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 104 bytes