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