Struct Option
pub struct Option(/* private fields */);
Implementations§
§impl Option
impl Option
pub 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.
pub 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.
Trait Implementations§
§impl BitAndAssign<u8> for Option
impl BitAndAssign<u8> for Option
§fn bitand_assign(&mut self, other: u8)
fn bitand_assign(&mut self, other: u8)
Performs the
&=
operation. Read more§impl BitAndAssign for Option
impl BitAndAssign for Option
§fn bitand_assign(&mut self, other: Option)
fn bitand_assign(&mut self, other: Option)
Performs the
&=
operation. Read more§impl BitOrAssign<u8> for Option
impl BitOrAssign<u8> for Option
§fn bitor_assign(&mut self, other: u8)
fn bitor_assign(&mut self, other: u8)
Performs the
|=
operation. Read more§impl BitOrAssign for Option
impl BitOrAssign for Option
§fn bitor_assign(&mut self, other: Option)
fn bitor_assign(&mut self, other: Option)
Performs the
|=
operation. Read more§impl Ord for Option
impl Ord for Option
§impl PartialOrd for Option
impl PartialOrd for Option
impl Copy for Option
impl Eq for Option
impl StructuralPartialEq for Option
Auto Trait Implementations§
impl Freeze for Option
impl RefUnwindSafe for Option
impl Send for Option
impl Sync for Option
impl Unpin for Option
impl UnwindSafe for Option
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
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)