pub struct FeatureSet { /* private fields */ }
Expand description
A collection of features, indexed by (feature_name, feature_version)
.
Implementations§
Source§impl FeatureSet
impl FeatureSet
Sourcepub fn from_provides<'a>(
provides: impl IntoIterator<Item = &'a Action<Provide>>,
) -> Self
pub fn from_provides<'a>( provides: impl IntoIterator<Item = &'a Action<Provide>>, ) -> Self
Create a new FeatureSet
from a sequence of actions that add or remove a provided feature.
Sourcepub fn from_required<'a>(
required: impl IntoIterator<Item = &'a Action<Require>>,
include_optional: bool,
) -> Self
pub fn from_required<'a>( required: impl IntoIterator<Item = &'a Action<Require>>, include_optional: bool, ) -> Self
Create a new FeatureSet
from a sequence of actions that add or remove a required feature.
If include_optional
is true
, then optional features are included in the resulting
FeatureSet
.
pub fn contains(&self, name_ver: (&str, u64)) -> bool
Trait Implementations§
Source§impl Clone for FeatureSet
impl Clone for FeatureSet
Source§fn clone(&self) -> FeatureSet
fn clone(&self) -> FeatureSet
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 FeatureSet
impl Debug for FeatureSet
Auto Trait Implementations§
impl Freeze for FeatureSet
impl RefUnwindSafe for FeatureSet
impl Send for FeatureSet
impl Sync for FeatureSet
impl Unpin for FeatureSet
impl UnwindSafe for FeatureSet
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