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
A feature enabling a dependency with dep:dep_name
syntax.
Fields
§
dep_name: InternedString
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
sourcefn explicit_dep_name(&self) -> Option<InternedString>
fn explicit_dep_name(&self) -> Option<InternedString>
Returns the name of the dependency if and only if it was explicitly named with the dep:
syntax.
fn feature_or_dep_name(&self) -> InternedString
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 for FeatureValue
impl PartialEq for FeatureValue
source§impl PartialOrd for FeatureValue
impl PartialOrd for FeatureValue
impl Eq for FeatureValue
impl StructuralPartialEq for FeatureValue
Auto Trait Implementations§
impl Freeze for FeatureValue
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.§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>
§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>
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