pub struct BoxedBitSet<A, V>(/* private fields */);Implementations§
Source§impl<A, V> BoxedBitSet<A, V>
impl<A, V> BoxedBitSet<A, V>
pub fn from_boxed_slice(store: Box<[A]>) -> Self
pub fn with_capacity(bits: usize) -> Selfwhere
A: Default,
pub fn as_raw_slice(&self) -> &[A]
pub fn as_raw_mut_slice(&mut self) -> &mut [A]
Methods from Deref<Target = BitSlice<A, V>>§
pub fn capacity(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn first(&self) -> Option<V>
pub fn last(&self) -> Option<V>
pub fn pop_first(&mut self) -> Option<V>
pub fn pop_last(&mut self) -> Option<V>
pub fn contains(&self, id: &V) -> bool
pub fn set(&mut self, id: V, value: bool)where
V: AsPrimitive<usize>,
pub fn insert(&mut self, id: V) -> boolwhere
V: AsPrimitive<usize>,
pub fn remove(&mut self, id: V) -> boolwhere
V: AsPrimitive<usize>,
pub fn toggle(&mut self, id: V)where
V: AsPrimitive<usize>,
pub fn clear(&mut self)
pub fn retain(&mut self, f: impl FnMut(V) -> bool)
pub fn append(&mut self, other: &mut Self)
pub fn iter(&self) -> BitSliceIter<'_, T, V> ⓘ
pub fn is_subset(&self, other: &Self) -> bool
pub fn is_superset(&self, other: &Self) -> bool
pub fn is_disjoint(&self, other: &Self) -> bool
pub fn difference<'a>(&'a self, other: &'a Self) -> impl Iterator<Item = V> + 'a
pub fn intersection<'a>( &'a self, other: &'a Self, ) -> impl Iterator<Item = V> + 'a
pub fn union<'a>(&'a self, other: &'a Self) -> impl Iterator<Item = V> + 'a
pub fn symmetric_difference<'a>( &'a self, other: &'a Self, ) -> impl Iterator<Item = V> + 'a
Trait Implementations§
Source§impl<A: PrimInt, V> BitAnd for BoxedBitSet<A, V>
impl<A: PrimInt, V> BitAnd for BoxedBitSet<A, V>
Source§impl<A: PrimInt, V> BitAndAssign for BoxedBitSet<A, V>
impl<A: PrimInt, V> BitAndAssign for BoxedBitSet<A, V>
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl<A: PrimInt, V> BitOr for BoxedBitSet<A, V>
impl<A: PrimInt, V> BitOr for BoxedBitSet<A, V>
Source§impl<A: PrimInt, V> BitOrAssign for BoxedBitSet<A, V>
impl<A: PrimInt, V> BitOrAssign for BoxedBitSet<A, V>
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl<A: PrimInt, V> BitXor for BoxedBitSet<A, V>
impl<A: PrimInt, V> BitXor for BoxedBitSet<A, V>
Source§impl<A: PrimInt, V> BitXorAssign for BoxedBitSet<A, V>
impl<A: PrimInt, V> BitXorAssign for BoxedBitSet<A, V>
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl<A: Clone, V> Clone for BoxedBitSet<A, V>
impl<A: Clone, V> Clone for BoxedBitSet<A, V>
Source§impl<A: PrimInt + BitAndAssign, V> Debug for BoxedBitSet<A, V>
impl<A: PrimInt + BitAndAssign, V> Debug for BoxedBitSet<A, V>
Source§impl<A, V> Deref for BoxedBitSet<A, V>
impl<A, V> Deref for BoxedBitSet<A, V>
Source§impl<A, V> DerefMut for BoxedBitSet<A, V>
impl<A, V> DerefMut for BoxedBitSet<A, V>
Source§impl<A: PrimInt, V> Extend<BoxedBitSet<A, V>> for BoxedBitSet<A, V>
impl<A: PrimInt, V> Extend<BoxedBitSet<A, V>> for BoxedBitSet<A, V>
Source§fn extend<I: IntoIterator<Item = Self>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = Self>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬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<A: PrimInt, V> FromIterator<BoxedBitSet<A, V>> for BoxedBitSet<A, V>
impl<A: PrimInt, V> FromIterator<BoxedBitSet<A, V>> for BoxedBitSet<A, V>
Source§fn from_iter<I: IntoIterator<Item = Self>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = Self>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl<'a, A: PrimInt + BitAndAssign, V: TryFrom<usize>> IntoIterator for &'a BoxedBitSet<A, V>
impl<'a, A: PrimInt + BitAndAssign, V: TryFrom<usize>> IntoIterator for &'a BoxedBitSet<A, V>
Source§impl<A: PrimInt, V> Not for BoxedBitSet<A, V>
impl<A: PrimInt, V> Not for BoxedBitSet<A, V>
Source§impl<A: PrimInt, V> PartialEq for BoxedBitSet<A, V>
impl<A: PrimInt, V> PartialEq for BoxedBitSet<A, V>
Source§impl<A: PrimInt, V> Sub for BoxedBitSet<A, V>
impl<A: PrimInt, V> Sub for BoxedBitSet<A, V>
Source§impl<A: PrimInt, V> SubAssign for BoxedBitSet<A, V>
impl<A: PrimInt, V> SubAssign for BoxedBitSet<A, V>
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl<A: PrimInt, V> Eq for BoxedBitSet<A, V>
Auto Trait Implementations§
impl<A, V> Freeze for BoxedBitSet<A, V>
impl<A, V> RefUnwindSafe for BoxedBitSet<A, V>where
V: RefUnwindSafe,
A: RefUnwindSafe,
impl<A, V> Send for BoxedBitSet<A, V>
impl<A, V> Sync for BoxedBitSet<A, V>
impl<A, V> Unpin for BoxedBitSet<A, V>where
V: Unpin,
impl<A, V> UnsafeUnpin for BoxedBitSet<A, V>
impl<A, V> UnwindSafe for BoxedBitSet<A, V>where
V: UnwindSafe,
A: UnwindSafe,
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