Skip to main content

FileMode

Struct FileMode 

Source
pub struct FileMode(/* private fields */);

Implementations§

Source§

impl FileMode

Source

pub const fn new() -> Self

Source

pub const fn empty() -> Self

Source

pub const fn from_bits_retain(raw: u8) -> Self

Source

pub const fn bits(&self) -> u8

Source

pub const fn as_bits(&self) -> &u8

Source

pub const unsafe fn from_bits_unchecked(bits: u8) -> Self

Source

pub const fn from_bits(bits: u8) -> Option<Self>

Source

pub const fn from_bits_truncate(bits: u8) -> Self

Source

pub const fn from_element(element: FileModeFlag) -> Self

Source

pub const fn from_slice(slice: &[FileModeFlag]) -> Self

Source

pub const fn contains(&self, value: &FileModeFlag) -> bool

Source

pub const fn len(&self) -> usize

Source

pub const fn is_empty(&self) -> bool

Source

pub const fn all() -> Self

Source

pub const fn is_all(&self) -> bool

Source

pub const fn complement(self) -> Self

Source

pub fn toggle(&mut self, value: FileModeFlag)

Source

pub fn set(&mut self, value: FileModeFlag, enabled: bool)

Source

pub fn insert(&mut self, value: FileModeFlag) -> bool

Source

pub fn remove(&mut self, value: FileModeFlag) -> bool

Source

pub fn clear(&mut self)

Source

pub const fn is_subset(&self, other: &Self) -> bool

Source

pub const fn is_superset(&self, other: &Self) -> bool

Source

pub const fn is_disjoint(&self, other: &Self) -> bool

Source

pub fn first(&self) -> Option<FileModeFlag>

Source

pub fn last(&self) -> Option<FileModeFlag>

Source

pub fn pop_first(&mut self) -> Option<FileModeFlag>

Source

pub fn pop_last(&mut self) -> Option<FileModeFlag>

Source

pub fn retain(&mut self, f: impl FnMut(FileModeFlag) -> bool)

Source

pub fn iter(&self) -> PrimBitSetIter<u8, FileModeFlag> ⓘ

Source

pub fn iter_names( &self, ) -> impl Iterator<Item = (&'static str, FileModeFlag)> + '_

Source

pub fn from_name(name: &str) -> Option<Self>

Source§

impl FileMode

Source

pub const CREATED: Self

Source

pub const READABLE: Self

Source

pub const WRITABLE: Self

Source

pub const APPENDING: Self

Source§

impl FileMode

Source

pub const fn raw_mode(self) -> &'static str

Trait Implementations§

Source§

impl Binary for FileMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd for FileMode

Source§

type Output = FileMode

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: FileMode) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign for FileMode

Source§

fn bitand_assign(&mut self, rhs: FileMode)

Performs the &= operation. Read more
Source§

impl BitFlagSet<FileModeFlag, u8> for FileMode

Source§

const BITS: u8

Source§

fn empty() -> Self

Source§

fn from_bits_retain(raw: u8) -> Self

Source§

fn from_element(element: FileModeFlag) -> Self

Source§

fn first(&self) -> Option<FileModeFlag>

Source§

fn last(&self) -> Option<FileModeFlag>

Source§

fn pop_first(&mut self) -> Option<FileModeFlag>

Source§

fn pop_last(&mut self) -> Option<FileModeFlag>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

fn insert(&mut self, value: FileModeFlag) -> bool

Source§

fn remove(&mut self, value: FileModeFlag) -> bool

Source§

fn is_subset(&self, other: &Self) -> bool

Source§

fn is_superset(&self, other: &Self) -> bool

Source§

fn is_disjoint(&self, other: &Self) -> bool

Source§

fn contains(&self, value: &FileModeFlag) -> bool

Source§

fn retain(&mut self, f: impl FnMut(FileModeFlag) -> bool)

Source§

fn iter(&self) -> PrimBitSetIter<u8, FileModeFlag> ⓘ

Source§

fn to_vec(&self) -> Vec<T>

Source§

impl BitOr for FileMode

Source§

type Output = FileMode

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: FileMode) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign for FileMode

Source§

fn bitor_assign(&mut self, rhs: FileMode)

Performs the |= operation. Read more
Source§

impl BitXor for FileMode

Source§

type Output = FileMode

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: FileMode) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign for FileMode

Source§

fn bitxor_assign(&mut self, rhs: FileMode)

Performs the ^= operation. Read more
Source§

impl Clone for FileMode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FileMode

Source§

impl Debug for FileMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FileMode

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for FileMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for FileMode

Source§

impl Extend<FileModeFlag> for FileMode

Source§

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)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

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 From<BitSet<u8, FileModeFlag>> for FileMode

Source§

fn from(bs: BitSet<u8, FileModeFlag>) -> Self

Converts to this type from the input type.
Source§

impl From<FileMode> for BitSet<u8, FileModeFlag>

Source§

fn from(val: FileMode) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize> From<[FileModeFlag; N]> for FileMode

Source§

fn from(array: [FileModeFlag; N]) -> Self

Converts to this type from the input type.
Source§

impl FromIterator<FileMode> for FileMode

Source§

fn from_iter<I: IntoIterator<Item = FileMode>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl FromIterator<FileModeFlag> for FileMode

Source§

fn from_iter<I: IntoIterator<Item = FileModeFlag>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl Index<FileModeFlag> for FileMode

Source§

type Output = bool

The returned type after indexing.
Source§

fn index(&self, value: FileModeFlag) -> &bool

Performs the indexing (container[index]) operation. Read more
Source§

impl IntoIterator for FileMode

Source§

type Item = FileModeFlag

The type of the elements being iterated over.
Source§

type IntoIter = PrimBitSetIter<u8, FileModeFlag>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for FileMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl NamedFlags for FileMode

Source§

type Element = FileModeFlag

Source§

fn flag_names() -> impl Iterator<Item = (&'static str, Self::Element)>

Source§

impl Not for FileMode

Source§

type Output = FileMode

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl Octal for FileMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for FileMode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FileMode

Source§

impl Sub for FileMode

Source§

type Output = FileMode

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: FileMode) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign for FileMode

Source§

fn sub_assign(&mut self, rhs: FileMode)

Performs the -= operation. Read more
Source§

impl UpperHex for FileMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Helper for T

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.