Enum cargo::core::summary::FeatureValue
source · pub enum FeatureValue {
Feature(InternedString),
Dep {
dep_name: InternedString,
},
DepFeature {
dep_name: InternedString,
dep_feature: InternedString,
weak: bool,
},
}
Expand description
FeatureValue represents the types of dependencies a feature can have.
Variants§
Feature(InternedString)
A feature enabling another feature.
Dep
Fields
§
dep_name: InternedString
A feature enabling a dependency with dep:dep_name
syntax.
DepFeature
A feature enabling a feature on a dependency with crate_name/feat_name
syntax.
Implementations§
source§impl FeatureValue
impl FeatureValue
pub fn new(feature: InternedString) -> FeatureValue
sourcepub fn has_dep_prefix(&self) -> bool
pub fn has_dep_prefix(&self) -> bool
Returns true
if this feature explicitly used dep:
syntax.
Trait Implementations§
source§impl Clone for FeatureValue
impl Clone for FeatureValue
source§fn clone(&self) -> FeatureValue
fn clone(&self) -> FeatureValue
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 FeatureValue
impl Debug for FeatureValue
source§impl Display for FeatureValue
impl Display for FeatureValue
source§impl Hash for FeatureValue
impl Hash for FeatureValue
source§impl Ord for FeatureValue
impl Ord for FeatureValue
source§fn cmp(&self, other: &FeatureValue) -> Ordering
fn cmp(&self, other: &FeatureValue) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<FeatureValue> for FeatureValue
impl PartialEq<FeatureValue> for FeatureValue
source§fn eq(&self, other: &FeatureValue) -> bool
fn eq(&self, other: &FeatureValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<FeatureValue> for FeatureValue
impl PartialOrd<FeatureValue> for FeatureValue
source§fn partial_cmp(&self, other: &FeatureValue) -> Option<Ordering>
fn partial_cmp(&self, other: &FeatureValue) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for FeatureValue
impl StructuralEq for FeatureValue
impl StructuralPartialEq for FeatureValue
Auto Trait Implementations§
impl RefUnwindSafe for FeatureValue
impl Send for FeatureValue
impl Sync for FeatureValue
impl Unpin for FeatureValue
impl UnwindSafe for FeatureValue
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 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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
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: 40 bytes
Size for each variant:
Feature
: 23 bytesDep
: 23 bytesDepFeature
: 39 bytes