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§
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 Methods§
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.