pub struct ChFlags(/* private fields */);Implementations§
Source§impl ChFlags
impl ChFlags
pub const fn new() -> Self
pub const fn empty() -> Self
pub const fn from_bits_retain(raw: u32) -> Self
pub const fn bits(&self) -> u32
pub const fn as_bits(&self) -> &u32
pub const unsafe fn from_bits_unchecked(bits: u32) -> Self
pub const fn from_bits(bits: u32) -> Option<Self>
pub const fn from_bits_truncate(bits: u32) -> Self
pub const fn from_element(element: ChFlag) -> Self
pub const fn from_slice(slice: &[ChFlag]) -> Self
pub const fn contains(&self, value: &ChFlag) -> 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: ChFlag)
pub fn set(&mut self, value: ChFlag, enabled: bool)
pub fn insert(&mut self, value: ChFlag) -> bool
pub fn remove(&mut self, value: ChFlag) -> 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<ChFlag>
pub fn last(&self) -> Option<ChFlag>
pub fn pop_first(&mut self) -> Option<ChFlag>
pub fn pop_last(&mut self) -> Option<ChFlag>
pub fn retain(&mut self, f: impl FnMut(ChFlag) -> bool)
pub fn iter(&self) -> PrimBitSetIter<u32, ChFlag> ⓘ
pub fn iter_names(&self) -> impl Iterator<Item = (&'static str, ChFlag)> + '_
pub fn from_name(name: &str) -> Option<Self>
Source§impl ChFlags
impl ChFlags
Sourcepub const UF_SETTABLE: Self
pub const UF_SETTABLE: Self
Owner-settable bits, including reserved user-flag positions.
pub const SF_SETTABLE: Self
Trait Implementations§
Source§impl BitAndAssign for ChFlags
impl BitAndAssign for ChFlags
Source§fn bitand_assign(&mut self, rhs: ChFlags)
fn bitand_assign(&mut self, rhs: ChFlags)
Performs the
&= operation. Read moreSource§impl BitFlagSet<ChFlag, u32> for ChFlags
impl BitFlagSet<ChFlag, u32> for ChFlags
const BITS: u8
fn empty() -> Self
fn from_bits_retain(raw: u32) -> Self
fn from_element(element: ChFlag) -> Self
fn first(&self) -> Option<ChFlag>
fn last(&self) -> Option<ChFlag>
fn pop_first(&mut self) -> Option<ChFlag>
fn pop_last(&mut self) -> Option<ChFlag>
fn len(&self) -> usize
fn is_empty(&self) -> bool
fn insert(&mut self, value: ChFlag) -> bool
fn remove(&mut self, value: ChFlag) -> 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: &ChFlag) -> bool
fn retain(&mut self, f: impl FnMut(ChFlag) -> bool)
fn iter(&self) -> PrimBitSetIter<u32, ChFlag> ⓘ
fn to_vec(&self) -> Vec<T>
Source§impl BitOrAssign for ChFlags
impl BitOrAssign for ChFlags
Source§fn bitor_assign(&mut self, rhs: ChFlags)
fn bitor_assign(&mut self, rhs: ChFlags)
Performs the
|= operation. Read moreSource§impl BitXorAssign for ChFlags
impl BitXorAssign for ChFlags
Source§fn bitxor_assign(&mut self, rhs: ChFlags)
fn bitxor_assign(&mut self, rhs: ChFlags)
Performs the
^= operation. Read moreimpl Copy for ChFlags
impl Eq for ChFlags
Source§impl Extend<ChFlag> for ChFlags
impl Extend<ChFlag> for ChFlags
Source§fn extend<I: IntoIterator<Item = ChFlag>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = ChFlag>>(&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 FromIterator<ChFlag> for ChFlags
impl FromIterator<ChFlag> for ChFlags
Source§impl FromIterator<ChFlags> for ChFlags
impl FromIterator<ChFlags> for ChFlags
Source§impl IntoIterator for ChFlags
impl IntoIterator for ChFlags
Source§impl NamedFlags for ChFlags
impl NamedFlags for ChFlags
impl StructuralPartialEq for ChFlags
Auto Trait Implementations§
impl Freeze for ChFlags
impl RefUnwindSafe for ChFlags
impl Send for ChFlags
impl Sync for ChFlags
impl Unpin for ChFlags
impl UnsafeUnpin for ChFlags
impl UnwindSafe for ChFlags
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