Enum guppy::platform::TargetFeatures
source · pub enum TargetFeatures {
Unknown,
Features(BTreeSet<Cow<'static, str>, Global>),
All,
}
Expand description
A set of target features to match.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unknown
The target features are unknown.
Features(BTreeSet<Cow<'static, str>, Global>)
Only match the specified features.
All
Match all features.
Implementations§
source§impl TargetFeatures
impl TargetFeatures
sourcepub fn features(
features: impl IntoIterator<Item = impl Into<Cow<'static, str>>>
) -> TargetFeatures
pub fn features( features: impl IntoIterator<Item = impl Into<Cow<'static, str>>> ) -> TargetFeatures
Creates a new TargetFeatures
which matches some features.
sourcepub fn none() -> TargetFeatures
pub fn none() -> TargetFeatures
Creates a new TargetFeatures
which doesn’t match any features.
Trait Implementations§
source§impl Arbitrary for TargetFeatures
impl Arbitrary for TargetFeatures
The Arbitrary
implementation for TargetFeatures
uses a predefined list of features.
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = BoxedStrategy<TargetFeatures>
type Strategy = BoxedStrategy<TargetFeatures>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(
_args: <TargetFeatures as Arbitrary>::Parameters
) -> <TargetFeatures as Arbitrary>::Strategy
fn arbitrary_with( _args: <TargetFeatures as Arbitrary>::Parameters ) -> <TargetFeatures as Arbitrary>::Strategy
source§impl Clone for TargetFeatures
impl Clone for TargetFeatures
source§fn clone(&self) -> TargetFeatures
fn clone(&self) -> TargetFeatures
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 TargetFeatures
impl Debug for TargetFeatures
source§impl Hash for TargetFeatures
impl Hash for TargetFeatures
source§impl Ord for TargetFeatures
impl Ord for TargetFeatures
source§fn cmp(&self, other: &TargetFeatures) -> Ordering
fn cmp(&self, other: &TargetFeatures) -> 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<TargetFeatures> for TargetFeatures
impl PartialEq<TargetFeatures> for TargetFeatures
source§fn eq(&self, other: &TargetFeatures) -> bool
fn eq(&self, other: &TargetFeatures) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<TargetFeatures> for TargetFeatures
impl PartialOrd<TargetFeatures> for TargetFeatures
source§fn partial_cmp(&self, other: &TargetFeatures) -> Option<Ordering>
fn partial_cmp(&self, other: &TargetFeatures) -> 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 TargetFeatures
impl StructuralEq for TargetFeatures
impl StructuralPartialEq for TargetFeatures
Auto Trait Implementations§
impl RefUnwindSafe for TargetFeatures
impl Send for TargetFeatures
impl Sync for TargetFeatures
impl Unpin for TargetFeatures
impl UnwindSafe for TargetFeatures
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<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.