Skip to main content

BitFlagSet

Trait BitFlagSet 

Source
pub trait BitFlagSet<T, A>
where Self: Sized + Copy + Clone + PartialEq + Eq + PartialOrd + Ord + Sub<Self> + SubAssign<Self> + BitAnd<Self> + BitAndAssign<Self> + BitOr<Self> + BitOrAssign<Self> + FromIterator<T> + FromIterator<Self>, A: PrimInt + BitAndAssign<A>, T: TryFrom<u8>,
{ const BITS: u8;
Show 18 methods // Required methods fn empty() -> Self; fn from_bits_retain(raw: A) -> Self; fn from_element(element: T) -> Self; fn first(&self) -> Option<T>; fn last(&self) -> Option<T>; fn pop_first(&mut self) -> Option<T>; fn pop_last(&mut self) -> Option<T>; fn len(&self) -> usize; fn is_empty(&self) -> bool; fn contains(&self, value: &T) -> bool; fn retain(&mut self, f: impl FnMut(T) -> bool); fn insert(&mut self, value: T) -> bool; fn remove(&mut self, value: T) -> bool; fn is_subset(&self, other: &Self) -> bool; fn is_superset(&self, other: &Self) -> bool; fn is_disjoint(&self, other: &Self) -> bool; fn iter(&self) -> PrimBitSetIter<A, T> ; // Provided method fn to_vec(&self) -> Vec<T> { ... }
}

Required Associated Constants§

Source

const BITS: u8

Required Methods§

Source

fn empty() -> Self

Source

fn from_bits_retain(raw: A) -> Self

Source

fn from_element(element: T) -> Self

Source

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

Source

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

Source

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

Source

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

Source

fn len(&self) -> usize

Source

fn is_empty(&self) -> bool

Source

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

Source

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

Source

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

Source

fn remove(&mut self, value: T) -> 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 iter(&self) -> PrimBitSetIter<A, T>

Provided Methods§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§