Struct rustc_data_structures::bitvec::SparseBitSet [−][src]
pub struct SparseBitSet<I: Idx> { /* fields omitted */ }
Methods
impl<I: Idx> SparseBitSet<I>
[src]
impl<I: Idx> SparseBitSet<I>
pub fn new() -> Self
[src]
pub fn new() -> Self
pub fn capacity(&self) -> usize
[src]
pub fn capacity(&self) -> usize
pub fn contains_chunk(&self, chunk: SparseChunk<I>) -> SparseChunk<I>
[src]
pub fn contains_chunk(&self, chunk: SparseChunk<I>) -> SparseChunk<I>
Returns a chunk containing only those bits that are already
present. You can test therefore if self
contains all the
bits in chunk already by doing chunk == self.contains_chunk(chunk)
.
pub fn insert_chunk(&mut self, chunk: SparseChunk<I>) -> SparseChunk<I>
[src]
pub fn insert_chunk(&mut self, chunk: SparseChunk<I>) -> SparseChunk<I>
Modifies self
to contain all the bits from chunk
(in
addition to any pre-existing bits); returns a new chunk that
contains only those bits that were newly added. You can test
if anything was inserted by invoking any()
on the returned
value.
pub fn remove_chunk(&mut self, chunk: SparseChunk<I>) -> SparseChunk<I>
[src]
pub fn remove_chunk(&mut self, chunk: SparseChunk<I>) -> SparseChunk<I>
pub fn clear(&mut self)
[src]
pub fn clear(&mut self)
pub fn chunks<'a>(
&'a self
) -> impl Iterator<Item = SparseChunk<I>> + 'a
[src]
pub fn chunks<'a>(
&'a self
) -> impl Iterator<Item = SparseChunk<I>> + 'a
pub fn contains(&self, index: I) -> bool
[src]
pub fn contains(&self, index: I) -> bool
pub fn insert(&mut self, index: I) -> bool
[src]
pub fn insert(&mut self, index: I) -> bool
pub fn remove(&mut self, index: I) -> bool
[src]
pub fn remove(&mut self, index: I) -> bool
pub fn iter<'a>(
&'a self
) -> impl Iterator<Item = I> + 'a
[src]
pub fn iter<'a>(
&'a self
) -> impl Iterator<Item = I> + 'a
Trait Implementations
impl<I: Clone + Idx> Clone for SparseBitSet<I>
[src]
impl<I: Clone + Idx> Clone for SparseBitSet<I>
fn clone(&self) -> SparseBitSet<I>
[src]
fn clone(&self) -> SparseBitSet<I>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<I: Debug + Idx> Debug for SparseBitSet<I>
[src]
impl<I: Debug + Idx> Debug for SparseBitSet<I>
Auto Trait Implementations
impl<I> Send for SparseBitSet<I> where
I: Send,
impl<I> Send for SparseBitSet<I> where
I: Send,
impl<I> Sync for SparseBitSet<I> where
I: Sync,
impl<I> Sync for SparseBitSet<I> where
I: Sync,