pub struct AllocationType { /* private fields */ }Expand description
Only available for Windows. Represents the bitflags for flAllocationType in VirtualAlloc.
Implementations§
Source§impl AllocationType
impl AllocationType
pub const MEM_COMMIT: AllocationType
pub const MEM_RESERVE: AllocationType
pub const MEM_RESET: AllocationType
pub const MEM_RESET_UNDO: AllocationType
pub const MEM_LARGE_PAGES: AllocationType
pub const MEM_PHYSICAL: AllocationType
pub const MEM_TOP_DOWN: AllocationType
pub const MEM_WRITE_WATCH: AllocationType
Sourcepub const fn empty() -> AllocationType
pub const fn empty() -> AllocationType
Returns an empty set of flags
Sourcepub const fn all() -> AllocationType
pub const fn all() -> AllocationType
Returns the set containing all flags.
Sourcepub fn from_bits(bits: u32) -> Option<AllocationType>
pub fn from_bits(bits: u32) -> Option<AllocationType>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u32) -> AllocationType
pub const fn from_bits_truncate(bits: u32) -> AllocationType
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> AllocationType
pub const unsafe fn from_bits_unchecked(bits: u32) -> AllocationType
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: AllocationType) -> bool
pub const fn intersects(&self, other: AllocationType) -> bool
Returns true if there are flags common to both self and other.
Sourcepub const fn contains(&self, other: AllocationType) -> bool
pub const fn contains(&self, other: AllocationType) -> bool
Returns true all of the flags in other are contained within self.
Sourcepub fn insert(&mut self, other: AllocationType)
pub fn insert(&mut self, other: AllocationType)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: AllocationType)
pub fn remove(&mut self, other: AllocationType)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: AllocationType)
pub fn toggle(&mut self, other: AllocationType)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: AllocationType, value: bool)
pub fn set(&mut self, other: AllocationType, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for AllocationType
impl Binary for AllocationType
Source§impl BitAnd for AllocationType
impl BitAnd for AllocationType
Source§fn bitand(self, other: AllocationType) -> AllocationType
fn bitand(self, other: AllocationType) -> AllocationType
Returns the intersection between the two sets of flags.
Source§type Output = AllocationType
type Output = AllocationType
& operator.Source§impl BitAndAssign for AllocationType
impl BitAndAssign for AllocationType
Source§fn bitand_assign(&mut self, other: AllocationType)
fn bitand_assign(&mut self, other: AllocationType)
Disables all flags disabled in the set.
Source§impl BitOr for AllocationType
impl BitOr for AllocationType
Source§fn bitor(self, other: AllocationType) -> AllocationType
fn bitor(self, other: AllocationType) -> AllocationType
Returns the union of the two sets of flags.
Source§type Output = AllocationType
type Output = AllocationType
| operator.Source§impl BitOrAssign for AllocationType
impl BitOrAssign for AllocationType
Source§fn bitor_assign(&mut self, other: AllocationType)
fn bitor_assign(&mut self, other: AllocationType)
Adds the set of flags.
Source§impl BitXor for AllocationType
impl BitXor for AllocationType
Source§fn bitxor(self, other: AllocationType) -> AllocationType
fn bitxor(self, other: AllocationType) -> AllocationType
Returns the left flags, but with all the right flags toggled.
Source§type Output = AllocationType
type Output = AllocationType
^ operator.Source§impl BitXorAssign for AllocationType
impl BitXorAssign for AllocationType
Source§fn bitxor_assign(&mut self, other: AllocationType)
fn bitxor_assign(&mut self, other: AllocationType)
Toggles the set of flags.
Source§impl Clone for AllocationType
impl Clone for AllocationType
Source§fn clone(&self) -> AllocationType
fn clone(&self) -> AllocationType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AllocationType
impl Debug for AllocationType
Source§impl Extend<AllocationType> for AllocationType
impl Extend<AllocationType> for AllocationType
Source§fn extend<T: IntoIterator<Item = AllocationType>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = AllocationType>>(&mut self, iterator: T)
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 FromIterator<AllocationType> for AllocationType
impl FromIterator<AllocationType> for AllocationType
Source§fn from_iter<T: IntoIterator<Item = AllocationType>>(
iterator: T,
) -> AllocationType
fn from_iter<T: IntoIterator<Item = AllocationType>>( iterator: T, ) -> AllocationType
Source§impl Hash for AllocationType
impl Hash for AllocationType
Source§impl LowerHex for AllocationType
impl LowerHex for AllocationType
Source§impl Not for AllocationType
impl Not for AllocationType
Source§fn not(self) -> AllocationType
fn not(self) -> AllocationType
Returns the complement of this set of flags.
Source§type Output = AllocationType
type Output = AllocationType
! operator.Source§impl Octal for AllocationType
impl Octal for AllocationType
Source§impl Ord for AllocationType
impl Ord for AllocationType
Source§fn cmp(&self, other: &AllocationType) -> Ordering
fn cmp(&self, other: &AllocationType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AllocationType
impl PartialEq for AllocationType
Source§impl PartialOrd for AllocationType
impl PartialOrd for AllocationType
Source§impl Sub for AllocationType
impl Sub for AllocationType
Source§fn sub(self, other: AllocationType) -> AllocationType
fn sub(self, other: AllocationType) -> AllocationType
Returns the set difference of the two sets of flags.
Source§type Output = AllocationType
type Output = AllocationType
- operator.Source§impl SubAssign for AllocationType
impl SubAssign for AllocationType
Source§fn sub_assign(&mut self, other: AllocationType)
fn sub_assign(&mut self, other: AllocationType)
Disables all flags enabled in the set.