Struct rustc_index::bit_set::GrowableBitSet
source · [−]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
sourceimpl<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
Trait Implementations
sourceimpl<T: Clone + Idx> Clone for GrowableBitSet<T>
impl<T: Clone + Idx> Clone for GrowableBitSet<T>
sourcefn clone(&self) -> GrowableBitSet<T>
fn clone(&self) -> GrowableBitSet<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<T: Debug + Idx> Debug for GrowableBitSet<T>
impl<T: Debug + Idx> Debug for GrowableBitSet<T>
sourceimpl<T: Idx> Default for GrowableBitSet<T>
impl<T: Idx> Default for GrowableBitSet<T>
sourceimpl<T: PartialEq + Idx> PartialEq<GrowableBitSet<T>> for GrowableBitSet<T>
impl<T: PartialEq + Idx> PartialEq<GrowableBitSet<T>> for GrowableBitSet<T>
sourcefn eq(&self, other: &GrowableBitSet<T>) -> bool
fn eq(&self, other: &GrowableBitSet<T>) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &GrowableBitSet<T>) -> bool
fn ne(&self, other: &GrowableBitSet<T>) -> bool
This method tests for !=.
impl<T: Idx> StructuralPartialEq for GrowableBitSet<T>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
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