pub struct GrowableBitSet<T: Idx> {
bit_set: BitSet<T>,
}
Expand description
A resizable bitset type with a dense representation.
T
is an index type, typically a newtyped usize
wrapper, but it can also
just be usize
.
All operations that involve an element will panic if the element is equal to or greater than the domain size.
Fields§
§bit_set: BitSet<T>
Implementations§
Source§impl<T: Idx> GrowableBitSet<T>
impl<T: Idx> GrowableBitSet<T>
Sourcepub fn ensure(&mut self, min_domain_size: usize)
pub fn ensure(&mut self, min_domain_size: usize)
Ensure that the set can hold at least min_domain_size
elements.
pub fn new_empty() -> GrowableBitSet<T>
pub fn with_capacity(capacity: usize) -> GrowableBitSet<T>
pub fn is_empty(&self) -> bool
pub fn contains(&self, elem: T) -> bool
pub fn iter(&self) -> BitIter<'_, T> ⓘ
pub fn len(&self) -> usize
Trait Implementations§
Source§impl<T: Clone + Idx> Clone for GrowableBitSet<T>
impl<T: Clone + Idx> Clone for GrowableBitSet<T>
Source§fn clone(&self) -> GrowableBitSet<T>
fn clone(&self) -> GrowableBitSet<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Idx> Default for GrowableBitSet<T>
impl<T: Idx> Default for GrowableBitSet<T>
Source§impl<T: Idx> From<GrowableBitSet<T>> for BitSet<T>
impl<T: Idx> From<GrowableBitSet<T>> for BitSet<T>
Source§fn from(bit_set: GrowableBitSet<T>) -> Self
fn from(bit_set: GrowableBitSet<T>) -> Self
Converts to this type from the input type.
impl<T: Idx> StructuralPartialEq for GrowableBitSet<T>
Auto Trait Implementations§
impl<T> Freeze for GrowableBitSet<T>
impl<T> RefUnwindSafe for GrowableBitSet<T>where
T: RefUnwindSafe,
impl<T> Send for GrowableBitSet<T>where
T: Send,
impl<T> Sync for GrowableBitSet<T>where
T: Sync,
impl<T> Unpin for GrowableBitSet<T>where
T: Unpin,
impl<T> UnwindSafe for GrowableBitSet<T>where
T: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes