pub struct AccessFlags(/* private fields */);Expand description
The flags for opening a file.
Implementations§
Source§impl AccessFlags
impl AccessFlags
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
Source§impl AccessFlags
impl AccessFlags
pub const READ_WRITE: Self
pub const fn into_permission(&self) -> Permission
Trait Implementations§
Source§impl BitAnd for AccessFlags
impl BitAnd for AccessFlags
Source§impl BitAndAssign for AccessFlags
impl BitAndAssign for AccessFlags
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Performs the
&= operation. Read moreSource§impl BitOr for AccessFlags
impl BitOr for AccessFlags
Source§impl BitOrAssign for AccessFlags
impl BitOrAssign for AccessFlags
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the
|= operation. Read moreSource§impl BitXor for AccessFlags
impl BitXor for AccessFlags
Source§impl BitXorAssign for AccessFlags
impl BitXorAssign for AccessFlags
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Performs the
^= operation. Read moreSource§impl Clone for AccessFlags
impl Clone for AccessFlags
Source§fn clone(&self) -> AccessFlags
fn clone(&self) -> AccessFlags
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 AccessFlags
impl Debug for AccessFlags
Source§impl From<AccessFlags> for Flags
impl From<AccessFlags> for Flags
Source§fn from(mode: AccessFlags) -> Self
fn from(mode: AccessFlags) -> Self
Converts to this type from the input type.
Source§impl Not for AccessFlags
impl Not for AccessFlags
Source§impl PartialEq for AccessFlags
impl PartialEq for AccessFlags
Source§impl Sub for AccessFlags
impl Sub for AccessFlags
Source§impl SubAssign for AccessFlags
impl SubAssign for AccessFlags
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moreimpl Copy for AccessFlags
impl Eq for AccessFlags
impl StructuralPartialEq for AccessFlags
Auto Trait Implementations§
impl Freeze for AccessFlags
impl RefUnwindSafe for AccessFlags
impl Send for AccessFlags
impl Sync for AccessFlags
impl Unpin for AccessFlags
impl UnwindSafe for AccessFlags
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