pub struct AllocationFlags { /* private fields */ }
Implementations§
Source§impl AllocationFlags
impl AllocationFlags
pub const ALLOCATION_NONE: AllocationFlags
pub const ABSOLUTE_ORIGIN_CHANGED: AllocationFlags
pub const DELEGATE_LAYOUT: AllocationFlags
Sourcepub const fn empty() -> AllocationFlags
pub const fn empty() -> AllocationFlags
Returns an empty set of flags
Sourcepub const fn all() -> AllocationFlags
pub const fn all() -> AllocationFlags
Returns the set containing all flags.
Sourcepub fn from_bits(bits: u32) -> Option<AllocationFlags>
pub fn from_bits(bits: u32) -> Option<AllocationFlags>
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) -> AllocationFlags
pub const fn from_bits_truncate(bits: u32) -> AllocationFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> AllocationFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> AllocationFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: AllocationFlags) -> bool
pub const fn intersects(&self, other: AllocationFlags) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: AllocationFlags) -> bool
pub const fn contains(&self, other: AllocationFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: AllocationFlags)
pub fn insert(&mut self, other: AllocationFlags)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: AllocationFlags)
pub fn remove(&mut self, other: AllocationFlags)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: AllocationFlags)
pub fn toggle(&mut self, other: AllocationFlags)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: AllocationFlags, value: bool)
pub fn set(&mut self, other: AllocationFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for AllocationFlags
impl Binary for AllocationFlags
Source§impl BitAnd for AllocationFlags
impl BitAnd for AllocationFlags
Source§fn bitand(self, other: AllocationFlags) -> AllocationFlags
fn bitand(self, other: AllocationFlags) -> AllocationFlags
Returns the intersection between the two sets of flags.
Source§type Output = AllocationFlags
type Output = AllocationFlags
&
operator.Source§impl BitAndAssign for AllocationFlags
impl BitAndAssign for AllocationFlags
Source§fn bitand_assign(&mut self, other: AllocationFlags)
fn bitand_assign(&mut self, other: AllocationFlags)
Disables all flags disabled in the set.
Source§impl BitOr for AllocationFlags
impl BitOr for AllocationFlags
Source§fn bitor(self, other: AllocationFlags) -> AllocationFlags
fn bitor(self, other: AllocationFlags) -> AllocationFlags
Returns the union of the two sets of flags.
Source§type Output = AllocationFlags
type Output = AllocationFlags
|
operator.Source§impl BitOrAssign for AllocationFlags
impl BitOrAssign for AllocationFlags
Source§fn bitor_assign(&mut self, other: AllocationFlags)
fn bitor_assign(&mut self, other: AllocationFlags)
Adds the set of flags.
Source§impl BitXor for AllocationFlags
impl BitXor for AllocationFlags
Source§fn bitxor(self, other: AllocationFlags) -> AllocationFlags
fn bitxor(self, other: AllocationFlags) -> AllocationFlags
Returns the left flags, but with all the right flags toggled.
Source§type Output = AllocationFlags
type Output = AllocationFlags
^
operator.Source§impl BitXorAssign for AllocationFlags
impl BitXorAssign for AllocationFlags
Source§fn bitxor_assign(&mut self, other: AllocationFlags)
fn bitxor_assign(&mut self, other: AllocationFlags)
Toggles the set of flags.
Source§impl Clone for AllocationFlags
impl Clone for AllocationFlags
Source§fn clone(&self) -> AllocationFlags
fn clone(&self) -> AllocationFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AllocationFlags
impl Debug for AllocationFlags
Source§impl Extend<AllocationFlags> for AllocationFlags
impl Extend<AllocationFlags> for AllocationFlags
Source§fn extend<T: IntoIterator<Item = AllocationFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = AllocationFlags>>(&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<AllocationFlags> for AllocationFlags
impl FromIterator<AllocationFlags> for AllocationFlags
Source§fn from_iter<T: IntoIterator<Item = AllocationFlags>>(
iterator: T,
) -> AllocationFlags
fn from_iter<T: IntoIterator<Item = AllocationFlags>>( iterator: T, ) -> AllocationFlags
Source§impl<'a> FromValue<'a> for AllocationFlags
impl<'a> FromValue<'a> for AllocationFlags
Source§unsafe fn from_value(value: &Value) -> Self
unsafe fn from_value(value: &Value) -> Self
Source§impl<'a> FromValueOptional<'a> for AllocationFlags
impl<'a> FromValueOptional<'a> for AllocationFlags
Source§impl Hash for AllocationFlags
impl Hash for AllocationFlags
Source§impl LowerHex for AllocationFlags
impl LowerHex for AllocationFlags
Source§impl Not for AllocationFlags
impl Not for AllocationFlags
Source§fn not(self) -> AllocationFlags
fn not(self) -> AllocationFlags
Returns the complement of this set of flags.
Source§type Output = AllocationFlags
type Output = AllocationFlags
!
operator.Source§impl Octal for AllocationFlags
impl Octal for AllocationFlags
Source§impl Ord for AllocationFlags
impl Ord for AllocationFlags
Source§fn cmp(&self, other: &AllocationFlags) -> Ordering
fn cmp(&self, other: &AllocationFlags) -> 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 AllocationFlags
impl PartialEq for AllocationFlags
Source§impl PartialOrd for AllocationFlags
impl PartialOrd for AllocationFlags
Source§impl SetValue for AllocationFlags
impl SetValue for AllocationFlags
Source§impl StaticType for AllocationFlags
impl StaticType for AllocationFlags
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.Source§impl Sub for AllocationFlags
impl Sub for AllocationFlags
Source§fn sub(self, other: AllocationFlags) -> AllocationFlags
fn sub(self, other: AllocationFlags) -> AllocationFlags
Returns the set difference of the two sets of flags.
Source§type Output = AllocationFlags
type Output = AllocationFlags
-
operator.Source§impl SubAssign for AllocationFlags
impl SubAssign for AllocationFlags
Source§fn sub_assign(&mut self, other: AllocationFlags)
fn sub_assign(&mut self, other: AllocationFlags)
Disables all flags enabled in the set.
Source§impl UpperHex for AllocationFlags
impl UpperHex for AllocationFlags
impl Copy for AllocationFlags
impl Eq for AllocationFlags
impl StructuralPartialEq for AllocationFlags
Auto Trait Implementations§
impl Freeze for AllocationFlags
impl RefUnwindSafe for AllocationFlags
impl Send for AllocationFlags
impl Sync for AllocationFlags
impl Unpin for AllocationFlags
impl UnwindSafe for AllocationFlags
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.