pub enum FeatureValue {
Feature(InternedString),
Dep {
dep_name: InternedString,
},
DepFeature {
dep_name: InternedString,
dep_feature: InternedString,
dep_prefix: bool,
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
Fields
dep_name: InternedString
dep_feature: InternedString
dep_prefix: bool
If this is true, then the feature used the dep:
prefix, which
prevents enabling the feature named dep_name
.
weak: bool
If true
, indicates the ?
syntax is used, which means this will
not automatically enable the dependency unless the dependency is
activated through some other means.
A feature enabling a feature on a dependency with crate_name/feat_name
syntax.
Implementations
sourceimpl 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
sourceimpl Clone for FeatureValue
impl Clone for FeatureValue
sourcefn clone(&self) -> FeatureValue
fn clone(&self) -> FeatureValue
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FeatureValue
impl Debug for FeatureValue
sourceimpl Display for FeatureValue
impl Display for FeatureValue
sourceimpl Hash for FeatureValue
impl Hash for FeatureValue
sourceimpl Ord for FeatureValue
impl Ord for FeatureValue
sourceimpl PartialEq<FeatureValue> for FeatureValue
impl PartialEq<FeatureValue> for FeatureValue
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &FeatureValue) -> bool
fn ne(&self, other: &FeatureValue) -> bool
This method tests for !=
.
sourceimpl PartialOrd<FeatureValue> for FeatureValue
impl PartialOrd<FeatureValue> for FeatureValue
sourcefn partial_cmp(&self, other: &FeatureValue) -> Option<Ordering>
fn partial_cmp(&self, other: &FeatureValue) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more