pub struct VirtualMemoryFeatureFlags(/* private fields */);
Implementations§
Source§impl VirtualMemoryFeatureFlags
impl VirtualMemoryFeatureFlags
Sourcepub const fn empty() -> VirtualMemoryFeatureFlags
pub const fn empty() -> VirtualMemoryFeatureFlags
Get a flags value with all bits unset.
Sourcepub const fn all() -> VirtualMemoryFeatureFlags
pub const fn all() -> VirtualMemoryFeatureFlags
Get a flags value with all known bits set.
Sourcepub 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.
Sourcepub const fn from_bits(bits: u32) -> Option<VirtualMemoryFeatureFlags>
pub const fn from_bits(bits: u32) -> Option<VirtualMemoryFeatureFlags>
Convert from a bits value.
This method will return None
if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> VirtualMemoryFeatureFlags
pub const fn from_bits_truncate(bits: u32) -> VirtualMemoryFeatureFlags
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> VirtualMemoryFeatureFlags
pub const fn from_bits_retain(bits: u32) -> VirtualMemoryFeatureFlags
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<VirtualMemoryFeatureFlags>
pub fn from_name(name: &str) -> Option<VirtualMemoryFeatureFlags>
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.
Sourcepub const fn intersects(&self, other: VirtualMemoryFeatureFlags) -> bool
pub const fn intersects(&self, other: VirtualMemoryFeatureFlags) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: VirtualMemoryFeatureFlags) -> bool
pub const fn contains(&self, other: VirtualMemoryFeatureFlags) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn insert(&mut self, other: VirtualMemoryFeatureFlags)
pub fn insert(&mut self, other: VirtualMemoryFeatureFlags)
The bitwise or (|
) of the bits in two flags values.
Sourcepub fn remove(&mut self, other: VirtualMemoryFeatureFlags)
pub fn remove(&mut self, other: VirtualMemoryFeatureFlags)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
Sourcepub fn toggle(&mut self, other: VirtualMemoryFeatureFlags)
pub fn toggle(&mut self, other: VirtualMemoryFeatureFlags)
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub fn set(&mut self, other: VirtualMemoryFeatureFlags, value: bool)
pub fn set(&mut self, other: VirtualMemoryFeatureFlags, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
Sourcepub const fn intersection(
self,
other: VirtualMemoryFeatureFlags,
) -> VirtualMemoryFeatureFlags
pub const fn intersection( self, other: VirtualMemoryFeatureFlags, ) -> VirtualMemoryFeatureFlags
The bitwise and (&
) of the bits in two flags values.
Sourcepub const fn union(
self,
other: VirtualMemoryFeatureFlags,
) -> VirtualMemoryFeatureFlags
pub const fn union( self, other: VirtualMemoryFeatureFlags, ) -> VirtualMemoryFeatureFlags
The bitwise or (|
) of the bits in two flags values.
Sourcepub const fn difference(
self,
other: VirtualMemoryFeatureFlags,
) -> VirtualMemoryFeatureFlags
pub const fn difference( self, other: VirtualMemoryFeatureFlags, ) -> VirtualMemoryFeatureFlags
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Sourcepub const fn symmetric_difference(
self,
other: VirtualMemoryFeatureFlags,
) -> VirtualMemoryFeatureFlags
pub const fn symmetric_difference( self, other: VirtualMemoryFeatureFlags, ) -> VirtualMemoryFeatureFlags
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub const fn complement(self) -> VirtualMemoryFeatureFlags
pub const fn complement(self) -> VirtualMemoryFeatureFlags
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§impl VirtualMemoryFeatureFlags
impl VirtualMemoryFeatureFlags
Sourcepub const fn iter(&self) -> Iter<VirtualMemoryFeatureFlags>
pub const fn iter(&self) -> Iter<VirtualMemoryFeatureFlags>
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.
Sourcepub const fn iter_names(&self) -> IterNames<VirtualMemoryFeatureFlags>
pub const fn iter_names(&self) -> IterNames<VirtualMemoryFeatureFlags>
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§
Source§impl Binary for VirtualMemoryFeatureFlags
impl Binary for VirtualMemoryFeatureFlags
Source§impl BitAnd for VirtualMemoryFeatureFlags
impl BitAnd for VirtualMemoryFeatureFlags
Source§fn bitand(self, other: VirtualMemoryFeatureFlags) -> VirtualMemoryFeatureFlags
fn bitand(self, other: VirtualMemoryFeatureFlags) -> VirtualMemoryFeatureFlags
The bitwise and (&
) of the bits in two flags values.
Source§type Output = VirtualMemoryFeatureFlags
type Output = VirtualMemoryFeatureFlags
&
operator.Source§impl BitAndAssign for VirtualMemoryFeatureFlags
impl BitAndAssign for VirtualMemoryFeatureFlags
Source§fn bitand_assign(&mut self, other: VirtualMemoryFeatureFlags)
fn bitand_assign(&mut self, other: VirtualMemoryFeatureFlags)
The bitwise and (&
) of the bits in two flags values.
Source§impl BitOr for VirtualMemoryFeatureFlags
impl BitOr for VirtualMemoryFeatureFlags
Source§fn bitor(self, other: VirtualMemoryFeatureFlags) -> VirtualMemoryFeatureFlags
fn bitor(self, other: VirtualMemoryFeatureFlags) -> VirtualMemoryFeatureFlags
The bitwise or (|
) of the bits in two flags values.
Source§type Output = VirtualMemoryFeatureFlags
type Output = VirtualMemoryFeatureFlags
|
operator.Source§impl BitOrAssign for VirtualMemoryFeatureFlags
impl BitOrAssign for VirtualMemoryFeatureFlags
Source§fn bitor_assign(&mut self, other: VirtualMemoryFeatureFlags)
fn bitor_assign(&mut self, other: VirtualMemoryFeatureFlags)
The bitwise or (|
) of the bits in two flags values.
Source§impl BitXor for VirtualMemoryFeatureFlags
impl BitXor for VirtualMemoryFeatureFlags
Source§fn bitxor(self, other: VirtualMemoryFeatureFlags) -> VirtualMemoryFeatureFlags
fn bitxor(self, other: VirtualMemoryFeatureFlags) -> VirtualMemoryFeatureFlags
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§type Output = VirtualMemoryFeatureFlags
type Output = VirtualMemoryFeatureFlags
^
operator.Source§impl BitXorAssign for VirtualMemoryFeatureFlags
impl BitXorAssign for VirtualMemoryFeatureFlags
Source§fn bitxor_assign(&mut self, other: VirtualMemoryFeatureFlags)
fn bitxor_assign(&mut self, other: VirtualMemoryFeatureFlags)
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§impl Clone for VirtualMemoryFeatureFlags
impl Clone for VirtualMemoryFeatureFlags
Source§fn clone(&self) -> VirtualMemoryFeatureFlags
fn clone(&self) -> VirtualMemoryFeatureFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for VirtualMemoryFeatureFlags
impl Debug for VirtualMemoryFeatureFlags
Source§impl Extend<VirtualMemoryFeatureFlags> for VirtualMemoryFeatureFlags
impl Extend<VirtualMemoryFeatureFlags> for VirtualMemoryFeatureFlags
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = VirtualMemoryFeatureFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = VirtualMemoryFeatureFlags>,
The bitwise or (|
) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl Flags for VirtualMemoryFeatureFlags
impl Flags for VirtualMemoryFeatureFlags
Source§const FLAGS: &'static [Flag<VirtualMemoryFeatureFlags>]
const FLAGS: &'static [Flag<VirtualMemoryFeatureFlags>]
Source§fn from_bits_retain(bits: u32) -> VirtualMemoryFeatureFlags
fn from_bits_retain(bits: u32) -> VirtualMemoryFeatureFlags
§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 intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read more§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.§fn set(&mut self, other: Self, value: bool)where
Self: Sized,
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
Flags::insert
] when value
is true
or [Flags::remove
] when value
is false
.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read more§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.Source§impl FromIterator<VirtualMemoryFeatureFlags> for VirtualMemoryFeatureFlags
impl FromIterator<VirtualMemoryFeatureFlags> for VirtualMemoryFeatureFlags
Source§fn from_iter<T>(iterator: T) -> VirtualMemoryFeatureFlagswhere
T: IntoIterator<Item = VirtualMemoryFeatureFlags>,
fn from_iter<T>(iterator: T) -> VirtualMemoryFeatureFlagswhere
T: IntoIterator<Item = VirtualMemoryFeatureFlags>,
The bitwise or (|
) of the bits in each flags value.
Source§impl Hash for VirtualMemoryFeatureFlags
impl Hash for VirtualMemoryFeatureFlags
Source§impl IntoIterator for VirtualMemoryFeatureFlags
impl IntoIterator for VirtualMemoryFeatureFlags
Source§type Item = VirtualMemoryFeatureFlags
type Item = VirtualMemoryFeatureFlags
Source§type IntoIter = Iter<VirtualMemoryFeatureFlags>
type IntoIter = Iter<VirtualMemoryFeatureFlags>
Source§fn into_iter(self) -> <VirtualMemoryFeatureFlags as IntoIterator>::IntoIter
fn into_iter(self) -> <VirtualMemoryFeatureFlags as IntoIterator>::IntoIter
Source§impl LowerHex for VirtualMemoryFeatureFlags
impl LowerHex for VirtualMemoryFeatureFlags
Source§impl Not for VirtualMemoryFeatureFlags
impl Not for VirtualMemoryFeatureFlags
Source§fn not(self) -> VirtualMemoryFeatureFlags
fn not(self) -> VirtualMemoryFeatureFlags
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§type Output = VirtualMemoryFeatureFlags
type Output = VirtualMemoryFeatureFlags
!
operator.Source§impl Octal for VirtualMemoryFeatureFlags
impl Octal for VirtualMemoryFeatureFlags
Source§impl Ord for VirtualMemoryFeatureFlags
impl Ord for VirtualMemoryFeatureFlags
Source§fn cmp(&self, other: &VirtualMemoryFeatureFlags) -> Ordering
fn cmp(&self, other: &VirtualMemoryFeatureFlags) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for VirtualMemoryFeatureFlags
impl PartialOrd for VirtualMemoryFeatureFlags
Source§impl Sub for VirtualMemoryFeatureFlags
impl Sub for VirtualMemoryFeatureFlags
Source§fn sub(self, other: VirtualMemoryFeatureFlags) -> VirtualMemoryFeatureFlags
fn sub(self, other: VirtualMemoryFeatureFlags) -> VirtualMemoryFeatureFlags
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Source§type Output = VirtualMemoryFeatureFlags
type Output = VirtualMemoryFeatureFlags
-
operator.Source§impl SubAssign for VirtualMemoryFeatureFlags
impl SubAssign for VirtualMemoryFeatureFlags
Source§fn sub_assign(&mut self, other: VirtualMemoryFeatureFlags)
fn sub_assign(&mut self, other: VirtualMemoryFeatureFlags)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.