Struct CpuSveFeatureFlags
pub struct CpuSveFeatureFlags(/* private fields */);Expand description
ARM64 SVE CPU feature flags retrieved via ZX_FEATURE_KIND_CPU_SVE.
Implementations§
§impl CpuSveFeatureFlags
impl CpuSveFeatureFlags
pub const fn empty() -> CpuSveFeatureFlags
pub const fn empty() -> CpuSveFeatureFlags
Get a flags value with all bits unset.
pub const fn all() -> CpuSveFeatureFlags
pub const fn all() -> CpuSveFeatureFlags
Get a flags value with all known bits set.
pub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
pub const fn from_bits(bits: u32) -> Option<CpuSveFeatureFlags>
pub const fn from_bits(bits: u32) -> Option<CpuSveFeatureFlags>
Convert from a bits value.
This method will return None if any unknown bits are set.
pub const fn from_bits_truncate(bits: u32) -> CpuSveFeatureFlags
pub const fn from_bits_truncate(bits: u32) -> CpuSveFeatureFlags
Convert from a bits value, unsetting any unknown bits.
pub const fn from_bits_retain(bits: u32) -> CpuSveFeatureFlags
pub const fn from_bits_retain(bits: u32) -> CpuSveFeatureFlags
Convert from a bits value exactly.
pub fn from_name(name: &str) -> Option<CpuSveFeatureFlags>
pub fn from_name(name: &str) -> Option<CpuSveFeatureFlags>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
pub const fn intersects(&self, other: CpuSveFeatureFlags) -> bool
pub const fn intersects(&self, other: CpuSveFeatureFlags) -> bool
Whether any set bits in other are also set in self.
pub const fn contains(&self, other: CpuSveFeatureFlags) -> bool
pub const fn contains(&self, other: CpuSveFeatureFlags) -> bool
Whether all set bits in other are also set in self.
pub fn insert(&mut self, other: CpuSveFeatureFlags)
pub fn insert(&mut self, other: CpuSveFeatureFlags)
The bitwise or (|) of the bits in self and other.
pub fn remove(&mut self, other: CpuSveFeatureFlags)
pub fn remove(&mut self, other: CpuSveFeatureFlags)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
pub fn toggle(&mut self, other: CpuSveFeatureFlags)
pub fn toggle(&mut self, other: CpuSveFeatureFlags)
The bitwise exclusive-or (^) of the bits in self and other.
pub fn set(&mut self, other: CpuSveFeatureFlags, value: bool)
pub fn set(&mut self, other: CpuSveFeatureFlags, value: bool)
Call insert when value is true or remove when value is false.
pub const fn intersection(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
pub const fn intersection(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
The bitwise and (&) of the bits in self and other.
pub const fn union(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
pub const fn union(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
The bitwise or (|) of the bits in self and other.
pub const fn difference(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
pub const fn difference(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
pub const fn symmetric_difference(
self,
other: CpuSveFeatureFlags,
) -> CpuSveFeatureFlags
pub const fn symmetric_difference( self, other: CpuSveFeatureFlags, ) -> CpuSveFeatureFlags
The bitwise exclusive-or (^) of the bits in self and other.
pub const fn complement(self) -> CpuSveFeatureFlags
pub const fn complement(self) -> CpuSveFeatureFlags
The bitwise negation (!) of the bits in self, truncating the result.
§impl CpuSveFeatureFlags
impl CpuSveFeatureFlags
pub const fn iter(&self) -> Iter<CpuSveFeatureFlags> ⓘ
pub const fn iter(&self) -> Iter<CpuSveFeatureFlags> ⓘ
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
pub const fn iter_names(&self) -> IterNames<CpuSveFeatureFlags> ⓘ
pub const fn iter_names(&self) -> IterNames<CpuSveFeatureFlags> ⓘ
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
§impl Binary for CpuSveFeatureFlags
impl Binary for CpuSveFeatureFlags
§impl BitAnd for CpuSveFeatureFlags
impl BitAnd for CpuSveFeatureFlags
§fn bitand(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
fn bitand(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
The bitwise and (&) of the bits in self and other.
§type Output = CpuSveFeatureFlags
type Output = CpuSveFeatureFlags
& operator.§impl BitAndAssign for CpuSveFeatureFlags
impl BitAndAssign for CpuSveFeatureFlags
§fn bitand_assign(&mut self, other: CpuSveFeatureFlags)
fn bitand_assign(&mut self, other: CpuSveFeatureFlags)
The bitwise and (&) of the bits in self and other.
§impl BitOr for CpuSveFeatureFlags
impl BitOr for CpuSveFeatureFlags
§fn bitor(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
fn bitor(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
The bitwise or (|) of the bits in self and other.
§type Output = CpuSveFeatureFlags
type Output = CpuSveFeatureFlags
| operator.§impl BitOrAssign for CpuSveFeatureFlags
impl BitOrAssign for CpuSveFeatureFlags
§fn bitor_assign(&mut self, other: CpuSveFeatureFlags)
fn bitor_assign(&mut self, other: CpuSveFeatureFlags)
The bitwise or (|) of the bits in self and other.
§impl BitXor for CpuSveFeatureFlags
impl BitXor for CpuSveFeatureFlags
§fn bitxor(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
fn bitxor(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
The bitwise exclusive-or (^) of the bits in self and other.
§type Output = CpuSveFeatureFlags
type Output = CpuSveFeatureFlags
^ operator.§impl BitXorAssign for CpuSveFeatureFlags
impl BitXorAssign for CpuSveFeatureFlags
§fn bitxor_assign(&mut self, other: CpuSveFeatureFlags)
fn bitxor_assign(&mut self, other: CpuSveFeatureFlags)
The bitwise exclusive-or (^) of the bits in self and other.
§impl Clone for CpuSveFeatureFlags
impl Clone for CpuSveFeatureFlags
§fn clone(&self) -> CpuSveFeatureFlags
fn clone(&self) -> CpuSveFeatureFlags
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CpuSveFeatureFlags
§impl Debug for CpuSveFeatureFlags
impl Debug for CpuSveFeatureFlags
impl Eq for CpuSveFeatureFlags
§impl Extend<CpuSveFeatureFlags> for CpuSveFeatureFlags
impl Extend<CpuSveFeatureFlags> for CpuSveFeatureFlags
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = CpuSveFeatureFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = CpuSveFeatureFlags>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)§impl FeatureFlags for CpuSveFeatureFlags
impl FeatureFlags for CpuSveFeatureFlags
§impl Flags for CpuSveFeatureFlags
impl Flags for CpuSveFeatureFlags
§const FLAGS: &'static [Flag<CpuSveFeatureFlags>]
const FLAGS: &'static [Flag<CpuSveFeatureFlags>]
§fn from_bits_retain(bits: u32) -> CpuSveFeatureFlags
fn from_bits_retain(bits: u32) -> CpuSveFeatureFlags
§fn all_named() -> CpuSveFeatureFlags
fn all_named() -> CpuSveFeatureFlags
§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
§fn iter_names(&self) -> IterNames<Self> ⓘ
fn iter_names(&self) -> IterNames<Self> ⓘ
§fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
Self::FLAGS.§fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.§impl FromIterator<CpuSveFeatureFlags> for CpuSveFeatureFlags
impl FromIterator<CpuSveFeatureFlags> for CpuSveFeatureFlags
§fn from_iter<T>(iterator: T) -> CpuSveFeatureFlagswhere
T: IntoIterator<Item = CpuSveFeatureFlags>,
fn from_iter<T>(iterator: T) -> CpuSveFeatureFlagswhere
T: IntoIterator<Item = CpuSveFeatureFlags>,
The bitwise or (|) of the bits in each flags value.
§impl Hash for CpuSveFeatureFlags
impl Hash for CpuSveFeatureFlags
§impl IntoIterator for CpuSveFeatureFlags
impl IntoIterator for CpuSveFeatureFlags
§type Item = CpuSveFeatureFlags
type Item = CpuSveFeatureFlags
§type IntoIter = Iter<CpuSveFeatureFlags>
type IntoIter = Iter<CpuSveFeatureFlags>
§fn into_iter(self) -> <CpuSveFeatureFlags as IntoIterator>::IntoIter
fn into_iter(self) -> <CpuSveFeatureFlags as IntoIterator>::IntoIter
§impl LowerHex for CpuSveFeatureFlags
impl LowerHex for CpuSveFeatureFlags
§impl Not for CpuSveFeatureFlags
impl Not for CpuSveFeatureFlags
§fn not(self) -> CpuSveFeatureFlags
fn not(self) -> CpuSveFeatureFlags
The bitwise negation (!) of the bits in self, truncating the result.
§type Output = CpuSveFeatureFlags
type Output = CpuSveFeatureFlags
! operator.§impl Octal for CpuSveFeatureFlags
impl Octal for CpuSveFeatureFlags
§impl Ord for CpuSveFeatureFlags
impl Ord for CpuSveFeatureFlags
§fn cmp(&self, other: &CpuSveFeatureFlags) -> Ordering
fn cmp(&self, other: &CpuSveFeatureFlags) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for CpuSveFeatureFlags
impl PartialEq for CpuSveFeatureFlags
§impl PartialOrd for CpuSveFeatureFlags
impl PartialOrd for CpuSveFeatureFlags
impl StructuralPartialEq for CpuSveFeatureFlags
§impl Sub for CpuSveFeatureFlags
impl Sub for CpuSveFeatureFlags
§fn sub(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
fn sub(self, other: CpuSveFeatureFlags) -> CpuSveFeatureFlags
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
§type Output = CpuSveFeatureFlags
type Output = CpuSveFeatureFlags
- operator.§impl SubAssign for CpuSveFeatureFlags
impl SubAssign for CpuSveFeatureFlags
§fn sub_assign(&mut self, other: CpuSveFeatureFlags)
fn sub_assign(&mut self, other: CpuSveFeatureFlags)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Auto Trait Implementations§
impl Freeze for CpuSveFeatureFlags
impl RefUnwindSafe for CpuSveFeatureFlags
impl Send for CpuSveFeatureFlags
impl Sync for CpuSveFeatureFlags
impl Unpin for CpuSveFeatureFlags
impl UnsafeUnpin for CpuSveFeatureFlags
impl UnwindSafe for CpuSveFeatureFlags
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
Source§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to Self