Enum guppy::platform::TargetFeatures
#[non_exhaustive]pub enum TargetFeatures {
Unknown,
Features(BTreeSet<Cow<'static, str>>),
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>>)
Only match the specified features.
All
Match all features.
Implementations§
§impl TargetFeatures
impl TargetFeatures
pub 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.
pub fn none() -> TargetFeatures
pub fn none() -> TargetFeatures
Creates a new TargetFeatures
which doesn’t match any features.
Trait Implementations§
§impl Clone for TargetFeatures
impl Clone for TargetFeatures
§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 more§impl Debug for TargetFeatures
impl Debug for TargetFeatures
§impl Hash for TargetFeatures
impl Hash for TargetFeatures
§impl Ord for TargetFeatures
impl Ord for TargetFeatures
§impl PartialEq for TargetFeatures
impl PartialEq for TargetFeatures
§impl PartialOrd for TargetFeatures
impl PartialOrd for TargetFeatures
impl Eq for TargetFeatures
impl StructuralPartialEq for TargetFeatures
Auto Trait Implementations§
impl Freeze for TargetFeatures
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<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.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more