pub struct StateFlags(/* private fields */);Expand description
The status flags of a file.
Implementations§
Source§impl StateFlags
impl StateFlags
Sourcepub const NonBlocking: Self
pub const NonBlocking: Self
Non-blocking mode.
Sourcepub const Synchronous: Self
pub const Synchronous: Self
Synchronous mode.
Sourcepub const SynchronousDataOnly: Self
pub const SynchronousDataOnly: Self
Synchronous data only mode.
pub const None: Self
pub const All: Self
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Checks if the flag set contains the specified flag(s)
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Checks if the flag set contains any of the specified flag(s)
Sourcepub const fn set(self, other: Self, value: bool) -> Self
pub const fn set(self, other: Self, value: bool) -> Self
Sets or clears the specified flag(s) based on the passed value
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
Returns the intersection of the two flag sets
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
Returns the difference between the two flag sets
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
Returns the symmetric difference between the two flag sets
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
Returns the complement of the flag set
Sourcepub const fn bits_used() -> u8
pub const fn bits_used() -> u8
Returns the number of bits required to represent all defined flags
Sourcepub const fn from_bits_truncate(bits: u8) -> Self
pub const fn from_bits_truncate(bits: u8) -> Self
Creates a flag set from raw bits, truncating any unknown bits
Sourcepub const unsafe fn from_bits_unchecked(bits: u8) -> Self
pub const unsafe fn from_bits_unchecked(bits: u8) -> Self
Creates a flag set from raw bits without checking validity
Trait Implementations§
Source§impl BitAnd for StateFlags
impl BitAnd for StateFlags
Source§impl BitAndAssign for StateFlags
impl BitAndAssign for StateFlags
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Performs the
&= operation. Read moreSource§impl BitOr for StateFlags
impl BitOr for StateFlags
Source§impl BitOrAssign for StateFlags
impl BitOrAssign for StateFlags
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the
|= operation. Read moreSource§impl BitXor for StateFlags
impl BitXor for StateFlags
Source§impl BitXorAssign for StateFlags
impl BitXorAssign for StateFlags
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Performs the
^= operation. Read moreSource§impl Clone for StateFlags
impl Clone for StateFlags
Source§fn clone(&self) -> StateFlags
fn clone(&self) -> StateFlags
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 StateFlags
impl Debug for StateFlags
Source§impl Not for StateFlags
impl Not for StateFlags
Source§impl PartialEq for StateFlags
impl PartialEq for StateFlags
Source§impl Sub for StateFlags
impl Sub for StateFlags
Source§impl SubAssign for StateFlags
impl SubAssign for StateFlags
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moreimpl Copy for StateFlags
impl Eq for StateFlags
impl StructuralPartialEq for StateFlags
Auto Trait Implementations§
impl Freeze for StateFlags
impl RefUnwindSafe for StateFlags
impl Send for StateFlags
impl Sync for StateFlags
impl Unpin for StateFlags
impl UnwindSafe for StateFlags
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