Struct rustc_data_structures::bitvec::SparseBitSet [−][src]
pub struct SparseBitSet<I: Idx> { chunk_bits: BTreeMap<u32, u128>, _marker: PhantomData<I>, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Fields
chunk_bits: BTreeMap<u32, u128>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
_marker: PhantomData<I>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<I: Idx> SparseBitSet<I>
[src]
impl<I: Idx> SparseBitSet<I>
pub fn new() -> Self
[src]
pub fn new() -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn capacity(&self) -> usize
[src]
pub fn capacity(&self) -> usize
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn contains_chunk(&self, chunk: SparseChunk<I>) -> SparseChunk<I>
[src]
pub fn contains_chunk(&self, chunk: SparseChunk<I>) -> SparseChunk<I>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn clear(&mut self)
[src]
pub fn clear(&mut self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn contains(&self, index: I) -> bool
[src]
pub fn contains(&self, index: I) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn insert(&mut self, index: I) -> bool
[src]
pub fn insert(&mut self, index: I) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn remove(&mut self, index: I) -> bool
[src]
pub fn remove(&mut self, index: I) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn iter<'a>(
&'a self
) -> impl Iterator<Item = I> + 'a
[src]
pub fn iter<'a>(
&'a self
) -> impl Iterator<Item = I> + 'a
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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)
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,