pub enum FeatureGroup {
ExactlyOne {
features: Vec<FeatureName>,
},
Xor {
features: Vec<FeatureName>,
},
Or {
features: Vec<FeatureName>,
},
}
Expand description
Defines a feature group.
Variants§
ExactlyOne
Defines a feature group whose features are mutually exclusive and one must always be enabled.
Fields
§
features: Vec<FeatureName>
Features of the group.
Xor
Defines a feature group whose features are mutually exclusive.
Fields
§
features: Vec<FeatureName>
Features of the group.
Or
Defines a feature group with no relations between its features.
Fields
§
features: Vec<FeatureName>
Features of the group.
Implementations§
Source§impl FeatureGroup
impl FeatureGroup
Sourcepub fn features(&self) -> Option<&Vec<FeatureName>>
pub fn features(&self) -> Option<&Vec<FeatureName>>
Returns the features part of the feature group.
Returns None
when the variant contains no features.
The relation between these features depends on the feature group variant.
Trait Implementations§
Source§impl Clone for FeatureGroup
impl Clone for FeatureGroup
Source§fn clone(&self) -> FeatureGroup
fn clone(&self) -> FeatureGroup
Returns a duplicate 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 FeatureGroup
impl Debug for FeatureGroup
Source§impl<'de> Deserialize<'de> for FeatureGroup
impl<'de> Deserialize<'de> for FeatureGroup
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FeatureGroup
impl RefUnwindSafe for FeatureGroup
impl Send for FeatureGroup
impl Sync for FeatureGroup
impl Unpin for FeatureGroup
impl UnwindSafe for FeatureGroup
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