Skip to main content

AccessMode

Struct AccessMode 

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

Implementations§

Source§

impl AccessMode

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: AccessFlag) -> Self

Source

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

Source

pub const fn contains(&self, value: &AccessFlag) -> 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: AccessFlag)

Source

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

Source

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

Source

pub fn remove(&mut self, value: AccessFlag) -> 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<AccessFlag>

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Trait Implementations§

Source§

impl Binary for AccessMode

Source§

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

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

impl BitAnd for AccessMode

Source§

type Output = AccessMode

The resulting type after applying the & operator.
Source§

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

Performs the & operation. Read more
Source§

impl BitAndAssign for AccessMode

Source§

fn bitand_assign(&mut self, rhs: AccessMode)

Performs the &= operation. Read more
Source§

impl BitFlagSet<AccessFlag, u8> for AccessMode

Source§

const BITS: u8

Source§

fn empty() -> Self

Source§

fn from_bits_retain(raw: u8) -> Self

Source§

fn from_element(element: AccessFlag) -> Self

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

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

Source§

fn remove(&mut self, value: AccessFlag) -> 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: &AccessFlag) -> bool

Source§

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

Source§

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

Source§

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

Source§

impl BitOr for AccessMode

Source§

type Output = AccessMode

The resulting type after applying the | operator.
Source§

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

Performs the | operation. Read more
Source§

impl BitOrAssign for AccessMode

Source§

fn bitor_assign(&mut self, rhs: AccessMode)

Performs the |= operation. Read more
Source§

impl BitXor for AccessMode

Source§

type Output = AccessMode

The resulting type after applying the ^ operator.
Source§

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

Performs the ^ operation. Read more
Source§

impl BitXorAssign for AccessMode

Source§

fn bitxor_assign(&mut self, rhs: AccessMode)

Performs the ^= operation. Read more
Source§

impl Clone for AccessMode

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 AccessMode

Source§

impl Debug for AccessMode

Source§

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

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

impl Default for AccessMode

Source§

fn default() -> Self

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

impl Display for AccessMode

Source§

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

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

impl Eq for AccessMode

Source§

impl Extend<AccessFlag> for AccessMode

Source§

fn extend<I: IntoIterator<Item = AccessFlag>>(&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<AccessMode> for BitSet<u8, AccessFlag>

Source§

fn from(val: AccessMode) -> Self

Converts to this type from the input type.
Source§

impl From<BitSet<u8, AccessFlag>> for AccessMode

Source§

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

Converts to this type from the input type.
Source§

impl<const N: usize> From<[AccessFlag; N]> for AccessMode

Source§

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

Converts to this type from the input type.
Source§

impl FromIterator<AccessFlag> for AccessMode

Source§

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

Creates a value from an iterator. Read more
Source§

impl FromIterator<AccessMode> for AccessMode

Source§

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

Creates a value from an iterator. Read more
Source§

impl Index<AccessFlag> for AccessMode

Source§

type Output = bool

The returned type after indexing.
Source§

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

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

impl IntoIterator for AccessMode

Source§

type Item = AccessFlag

The type of the elements being iterated over.
Source§

type IntoIter = PrimBitSetIter<u8, AccessFlag>

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 AccessMode

Source§

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

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

impl NamedFlags for AccessMode

Source§

type Element = AccessFlag

Source§

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

Source§

impl Not for AccessMode

Source§

type Output = AccessMode

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl Octal for AccessMode

Source§

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

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

impl PartialEq for AccessMode

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 AccessMode

Source§

impl Sub for AccessMode

Source§

type Output = AccessMode

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl SubAssign for AccessMode

Source§

fn sub_assign(&mut self, rhs: AccessMode)

Performs the -= operation. Read more
Source§

impl UpperHex for AccessMode

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.