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