pub struct Flag { /* private fields */ }Implementations§
Source§impl Flag
impl Flag
Sourcepub fn from_bits(bits: u8) -> Option<Flag>
pub fn from_bits(bits: u8) -> Option<Flag>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub fn from_bits_truncate(bits: u8) -> Flag
pub fn from_bits_truncate(bits: u8) -> Flag
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub fn intersects(&self, other: Flag) -> bool
pub fn intersects(&self, other: Flag) -> bool
Returns true if there are flags common to both self and other.
Trait Implementations§
Source§impl Ord for Flag
impl Ord for Flag
Source§impl PartialOrd for Flag
impl PartialOrd for Flag
impl Copy for Flag
impl Eq for Flag
impl StructuralPartialEq for Flag
Auto Trait Implementations§
impl Freeze for Flag
impl RefUnwindSafe for Flag
impl Send for Flag
impl Sync for Flag
impl Unpin for Flag
impl UnwindSafe for Flag
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