pub enum RequestedFeatures {
CliFeatures(CliFeatures),
DepFeatures {
features: Rc<BTreeSet<InternedString>>,
uses_default_features: bool,
},
}
Expand description
Features flags requested for a package.
This should be cheap and fast to clone, it is used in the resolver for various caches.
This is split into enum variants because the resolver needs to handle features coming from different places (command-line and dependency declarations), but those different places have different constraints on which syntax is allowed. This helps ensure that every place dealing with features is properly handling those syntax restrictions.
Variants§
CliFeatures(CliFeatures)
Features requested on the command-line with flags.
DepFeatures
Fields
features: Rc<BTreeSet<InternedString>>
The features
dependency field.
Features specified in a dependency declaration.
Trait Implementations§
source§impl Clone for RequestedFeatures
impl Clone for RequestedFeatures
source§fn clone(&self) -> RequestedFeatures
fn clone(&self) -> RequestedFeatures
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RequestedFeatures
impl Debug for RequestedFeatures
source§impl Hash for RequestedFeatures
impl Hash for RequestedFeatures
source§impl PartialEq<RequestedFeatures> for RequestedFeatures
impl PartialEq<RequestedFeatures> for RequestedFeatures
source§fn eq(&self, other: &RequestedFeatures) -> bool
fn eq(&self, other: &RequestedFeatures) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for RequestedFeatures
impl StructuralEq for RequestedFeatures
impl StructuralPartialEq for RequestedFeatures
Auto Trait Implementations§
impl RefUnwindSafe for RequestedFeatures
impl !Send for RequestedFeatures
impl !Sync for RequestedFeatures
impl Unpin for RequestedFeatures
impl UnwindSafe for RequestedFeatures
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§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>,
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
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: 24 bytes
Size for each variant:
CliFeatures
: 23 bytesDepFeatures
: 15 bytes