Skip to main content

BoxedBitSet

Struct BoxedBitSet 

Source
pub struct BoxedBitSet<A, V>(/* private fields */);

Implementations§

Source§

impl<A, V> BoxedBitSet<A, V>

Source

pub fn from_boxed_slice(store: Box<[A]>) -> Self

Source

pub fn with_capacity(bits: usize) -> Self
where A: Default,

Source

pub fn as_raw_slice(&self) -> &[A]

Source

pub fn as_raw_mut_slice(&mut self) -> &mut [A]

Methods from Deref<Target = BitSlice<A, V>>§

Source

pub fn capacity(&self) -> usize

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn first(&self) -> Option<V>
where V: TryFrom<usize>,

Source

pub fn last(&self) -> Option<V>
where V: TryFrom<usize>,

Source

pub fn pop_first(&mut self) -> Option<V>
where V: TryFrom<usize>,

Source

pub fn pop_last(&mut self) -> Option<V>
where V: TryFrom<usize>,

Source

pub fn contains(&self, id: &V) -> bool
where V: Copy + AsPrimitive<usize>,

Source

pub fn set(&mut self, id: V, value: bool)
where V: AsPrimitive<usize>,

Source

pub fn insert(&mut self, id: V) -> bool
where V: AsPrimitive<usize>,

Source

pub fn remove(&mut self, id: V) -> bool
where V: AsPrimitive<usize>,

Source

pub fn toggle(&mut self, id: V)
where V: AsPrimitive<usize>,

Source

pub fn clear(&mut self)

Source

pub fn retain(&mut self, f: impl FnMut(V) -> bool)
where V: TryFrom<usize>,

Source

pub fn append(&mut self, other: &mut Self)

Source

pub fn iter(&self) -> BitSliceIter<'_, T, V>
where T: BitAndAssign, V: TryFrom<usize>,

Source

pub fn is_subset(&self, other: &Self) -> bool

Source

pub fn is_superset(&self, other: &Self) -> bool

Source

pub fn is_disjoint(&self, other: &Self) -> bool

Source

pub fn difference<'a>(&'a self, other: &'a Self) -> impl Iterator<Item = V> + 'a
where T: BitAndAssign, V: TryFrom<usize>,

Source

pub fn intersection<'a>( &'a self, other: &'a Self, ) -> impl Iterator<Item = V> + 'a
where T: BitAndAssign, V: TryFrom<usize>,

Source

pub fn union<'a>(&'a self, other: &'a Self) -> impl Iterator<Item = V> + 'a
where T: BitAndAssign, V: TryFrom<usize>,

Source

pub fn symmetric_difference<'a>( &'a self, other: &'a Self, ) -> impl Iterator<Item = V> + 'a
where T: BitAndAssign, V: TryFrom<usize>,

Source

pub fn raw_words(&self) -> &[T]

Raw word slice accessor.

Trait Implementations§

Source§

impl<A: PrimInt, V> BitAnd for BoxedBitSet<A, V>

Source§

type Output = BoxedBitSet<A, V>

The resulting type after applying the & operator.
Source§

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

Performs the & operation. Read more
Source§

impl<A: PrimInt, V> BitAndAssign for BoxedBitSet<A, V>

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl<A: PrimInt, V> BitOr for BoxedBitSet<A, V>

Source§

type Output = BoxedBitSet<A, V>

The resulting type after applying the | operator.
Source§

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

Performs the | operation. Read more
Source§

impl<A: PrimInt, V> BitOrAssign for BoxedBitSet<A, V>

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl<A: PrimInt, V> BitXor for BoxedBitSet<A, V>

Source§

type Output = BoxedBitSet<A, V>

The resulting type after applying the ^ operator.
Source§

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

Performs the ^ operation. Read more
Source§

impl<A: PrimInt, V> BitXorAssign for BoxedBitSet<A, V>

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl<A: Clone, V> Clone for BoxedBitSet<A, V>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A: PrimInt + BitAndAssign, V> Debug for BoxedBitSet<A, V>

Source§

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

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

impl<A, V> Deref for BoxedBitSet<A, V>

Source§

type Target = BitSlice<A, V>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<A, V> DerefMut for BoxedBitSet<A, V>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<A: PrimInt, V> Extend<BoxedBitSet<A, V>> for BoxedBitSet<A, V>

Source§

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)

🔬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<A: PrimInt, V> FromIterator<BoxedBitSet<A, V>> for BoxedBitSet<A, V>

Source§

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

Creates a value from an iterator. Read more
Source§

impl<A: PrimInt + Hash, V> Hash for BoxedBitSet<A, V>

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a, A: PrimInt + BitAndAssign, V: TryFrom<usize>> IntoIterator for &'a BoxedBitSet<A, V>

Source§

type Item = V

The type of the elements being iterated over.
Source§

type IntoIter = BitSliceIter<'a, A, V>

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<A: PrimInt, V> Not for BoxedBitSet<A, V>

Source§

type Output = BoxedBitSet<A, V>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self

Performs the unary ! operation. Read more
Source§

impl<A: PrimInt, V> PartialEq for BoxedBitSet<A, V>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A: PrimInt, V> Sub for BoxedBitSet<A, V>

Source§

type Output = BoxedBitSet<A, V>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<A: PrimInt, V> SubAssign for BoxedBitSet<A, V>

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<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>

§

impl<A, V> Send for BoxedBitSet<A, V>
where V: Send, A: Send,

§

impl<A, V> Sync for BoxedBitSet<A, V>
where V: Sync, A: Sync,

§

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> 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, 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.