pub struct Capability(/* private fields */);Implementations§
Source§impl Capability
impl Capability
pub const NONE: Capability
pub const ASYNC: Capability
pub const FENCE: Capability
pub const UST: Capability
pub const ASYNC_MAY_TEAR: Capability
pub const SYNCOBJ: Capability
Source§impl Capability
impl Capability
Sourcepub fn contains(self, flag: impl Into<u8>) -> bool
pub fn contains(self, flag: impl Into<u8>) -> bool
Check if this object has all bits set that are also set in flag.
flag can be a single enum variant or a whole other mask.
Sourcepub fn intersects(self, flag: impl Into<u8>) -> bool
pub fn intersects(self, flag: impl Into<u8>) -> bool
Check if this object has some bits set that are also set in flag.
flag can be a single enum variant or a whole other mask.
Sourcepub fn remove(self, flags: impl Into<u8>) -> Capability
pub fn remove(self, flags: impl Into<u8>) -> Capability
Remove some flags.
All bits that are set in the given flags are removed from the self instance, if
they are present.
Trait Implementations§
Source§impl BitAnd<u8> for Capability
impl BitAnd<u8> for Capability
Source§impl BitAnd for Capability
impl BitAnd for Capability
Source§type Output = Capability
type Output = Capability
The resulting type after applying the
& operator.Source§fn bitand(self, other: Capability) -> <Capability as BitAnd>::Output
fn bitand(self, other: Capability) -> <Capability as BitAnd>::Output
Performs the
& operation. Read moreSource§impl BitAndAssign<u8> for Capability
impl BitAndAssign<u8> for Capability
Source§fn bitand_assign(&mut self, other: u8)
fn bitand_assign(&mut self, other: u8)
Performs the
&= operation. Read moreSource§impl BitAndAssign for Capability
impl BitAndAssign for Capability
Source§fn bitand_assign(&mut self, other: Capability)
fn bitand_assign(&mut self, other: Capability)
Performs the
&= operation. Read moreSource§impl BitOr<u8> for Capability
impl BitOr<u8> for Capability
Source§impl BitOr for Capability
impl BitOr for Capability
Source§type Output = Capability
type Output = Capability
The resulting type after applying the
| operator.Source§fn bitor(self, other: Capability) -> <Capability as BitOr>::Output
fn bitor(self, other: Capability) -> <Capability as BitOr>::Output
Performs the
| operation. Read moreSource§impl BitOrAssign<u8> for Capability
impl BitOrAssign<u8> for Capability
Source§fn bitor_assign(&mut self, other: u8)
fn bitor_assign(&mut self, other: u8)
Performs the
|= operation. Read moreSource§impl BitOrAssign for Capability
impl BitOrAssign for Capability
Source§fn bitor_assign(&mut self, other: Capability)
fn bitor_assign(&mut self, other: Capability)
Performs the
|= operation. Read moreSource§impl Clone for Capability
impl Clone for Capability
Source§fn clone(&self) -> Capability
fn clone(&self) -> Capability
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Capability
impl Debug for Capability
Source§impl Default for Capability
impl Default for Capability
Source§fn default() -> Capability
fn default() -> Capability
Returns the “default value” for a type. Read more
Source§impl From<u8> for Capability
impl From<u8> for Capability
Source§fn from(value: u8) -> Capability
fn from(value: u8) -> Capability
Converts to this type from the input type.
Source§impl Hash for Capability
impl Hash for Capability
Source§impl Ord for Capability
impl Ord for Capability
Source§fn cmp(&self, other: &Capability) -> Ordering
fn cmp(&self, other: &Capability) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Capability
impl PartialEq for Capability
Source§impl PartialOrd for Capability
impl PartialOrd for Capability
impl Copy for Capability
impl Eq for Capability
impl StructuralPartialEq for Capability
Auto Trait Implementations§
impl Freeze for Capability
impl RefUnwindSafe for Capability
impl Send for Capability
impl Sync for Capability
impl Unpin for Capability
impl UnwindSafe for Capability
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
Mutably borrows from an owned value. Read more