pub struct FileMode(/* private fields */);Implementations§
Source§impl FileMode
impl FileMode
pub const fn new() -> Self
pub const fn empty() -> Self
pub const fn from_bits_retain(raw: u8) -> Self
pub const fn bits(&self) -> u8
pub const fn as_bits(&self) -> &u8
pub const unsafe fn from_bits_unchecked(bits: u8) -> Self
pub const fn from_bits(bits: u8) -> Option<Self>
pub const fn from_bits_truncate(bits: u8) -> Self
pub const fn from_element(element: FileModeFlag) -> Self
pub const fn from_slice(slice: &[FileModeFlag]) -> Self
pub const fn contains(&self, value: &FileModeFlag) -> bool
pub const fn len(&self) -> usize
pub const fn is_empty(&self) -> bool
pub const fn all() -> Self
pub const fn is_all(&self) -> bool
pub const fn complement(self) -> Self
pub fn toggle(&mut self, value: FileModeFlag)
pub fn set(&mut self, value: FileModeFlag, enabled: bool)
pub fn insert(&mut self, value: FileModeFlag) -> bool
pub fn remove(&mut self, value: FileModeFlag) -> bool
pub fn clear(&mut self)
pub const fn is_subset(&self, other: &Self) -> bool
pub const fn is_superset(&self, other: &Self) -> bool
pub const fn is_disjoint(&self, other: &Self) -> bool
pub fn first(&self) -> Option<FileModeFlag>
pub fn last(&self) -> Option<FileModeFlag>
pub fn pop_first(&mut self) -> Option<FileModeFlag>
pub fn pop_last(&mut self) -> Option<FileModeFlag>
pub fn retain(&mut self, f: impl FnMut(FileModeFlag) -> bool)
pub fn iter(&self) -> PrimBitSetIter<u8, FileModeFlag> ⓘ
pub fn iter_names(
&self,
) -> impl Iterator<Item = (&'static str, FileModeFlag)> + '_where
FileModeFlag: BitFlag,
pub fn from_name(name: &str) -> Option<Self>where
FileModeFlag: BitFlag,
Trait Implementations§
Source§impl BitAndAssign for FileMode
impl BitAndAssign for FileMode
Source§fn bitand_assign(&mut self, rhs: FileMode)
fn bitand_assign(&mut self, rhs: FileMode)
Performs the
&= operation. Read moreSource§impl BitFlagSet<FileModeFlag, u8> for FileMode
impl BitFlagSet<FileModeFlag, u8> for FileMode
const BITS: u8
fn empty() -> Self
fn from_bits_retain(raw: u8) -> Self
fn from_element(element: FileModeFlag) -> Self
fn first(&self) -> Option<FileModeFlag>
fn last(&self) -> Option<FileModeFlag>
fn pop_first(&mut self) -> Option<FileModeFlag>
fn pop_last(&mut self) -> Option<FileModeFlag>
fn len(&self) -> usize
fn is_empty(&self) -> bool
fn insert(&mut self, value: FileModeFlag) -> bool
fn remove(&mut self, value: FileModeFlag) -> bool
fn is_subset(&self, other: &Self) -> bool
fn is_superset(&self, other: &Self) -> bool
fn is_disjoint(&self, other: &Self) -> bool
fn contains(&self, value: &FileModeFlag) -> bool
fn retain(&mut self, f: impl FnMut(FileModeFlag) -> bool)
fn iter(&self) -> PrimBitSetIter<u8, FileModeFlag> ⓘ
fn to_vec(&self) -> Vec<T>
Source§impl BitOrAssign for FileMode
impl BitOrAssign for FileMode
Source§fn bitor_assign(&mut self, rhs: FileMode)
fn bitor_assign(&mut self, rhs: FileMode)
Performs the
|= operation. Read moreSource§impl BitXorAssign for FileMode
impl BitXorAssign for FileMode
Source§fn bitxor_assign(&mut self, rhs: FileMode)
fn bitxor_assign(&mut self, rhs: FileMode)
Performs the
^= operation. Read moreimpl Copy for FileMode
impl Eq for FileMode
Source§impl Extend<FileModeFlag> for FileMode
impl Extend<FileModeFlag> for FileMode
Source§fn extend<I: IntoIterator<Item = FileModeFlag>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = FileModeFlag>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<const N: usize> From<[FileModeFlag; N]> for FileMode
impl<const N: usize> From<[FileModeFlag; N]> for FileMode
Source§fn from(array: [FileModeFlag; N]) -> Self
fn from(array: [FileModeFlag; N]) -> Self
Converts to this type from the input type.
Source§impl FromIterator<FileMode> for FileMode
impl FromIterator<FileMode> for FileMode
Source§impl FromIterator<FileModeFlag> for FileMode
impl FromIterator<FileModeFlag> for FileMode
Source§fn from_iter<I: IntoIterator<Item = FileModeFlag>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = FileModeFlag>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl Index<FileModeFlag> for FileMode
impl Index<FileModeFlag> for FileMode
Source§impl IntoIterator for FileMode
impl IntoIterator for FileMode
Source§type Item = FileModeFlag
type Item = FileModeFlag
The type of the elements being iterated over.
Source§type IntoIter = PrimBitSetIter<u8, FileModeFlag>
type IntoIter = PrimBitSetIter<u8, FileModeFlag>
Which kind of iterator are we turning this into?
Source§impl NamedFlags for FileMode
impl NamedFlags for FileMode
type Element = FileModeFlag
fn flag_names() -> impl Iterator<Item = (&'static str, Self::Element)>
impl StructuralPartialEq for FileMode
Auto Trait Implementations§
impl Freeze for FileMode
impl RefUnwindSafe for FileMode
impl Send for FileMode
impl Sync for FileMode
impl Unpin for FileMode
impl UnsafeUnpin for FileMode
impl UnwindSafe for FileMode
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