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
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RequestedFeatures
impl Debug for RequestedFeatures
source§impl Hash for RequestedFeatures
impl Hash for RequestedFeatures
source§impl PartialEq for RequestedFeatures
impl PartialEq for RequestedFeatures
source§fn eq(&self, other: &RequestedFeatures) -> bool
fn eq(&self, other: &RequestedFeatures) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq 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
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.