Struct rustc_data_structures::bitvec::BitVector [−][src]
pub struct BitVector<C: Idx> { /* fields omitted */ }
A very simple BitVector type.
Methods
impl<C: Idx> BitVector<C>[src]
impl<C: Idx> BitVector<C>pub fn new(num_bits: usize) -> BitVector<C>[src]
pub fn new(num_bits: usize) -> BitVector<C>pub fn clear(&mut self)[src]
pub fn clear(&mut self)pub fn count(&self) -> usize[src]
pub fn count(&self) -> usizepub fn contains(&self, bit: C) -> bool[src]
pub fn contains(&self, bit: C) -> boolTrue if self contains the bit bit.
pub fn contains_all(&self, other: &BitVector<C>) -> bool[src]
pub fn contains_all(&self, other: &BitVector<C>) -> boolTrue if self contains all the bits in other.
The two vectors must have the same length.
pub fn is_empty(&self) -> bool[src]
pub fn is_empty(&self) -> boolpub fn insert(&mut self, bit: C) -> bool[src]
pub fn insert(&mut self, bit: C) -> boolReturns true if the bit has changed.
pub fn insert_all(&mut self)[src]
pub fn insert_all(&mut self)Sets all bits to true.
pub fn remove(&mut self, bit: C) -> bool[src]
pub fn remove(&mut self, bit: C) -> boolReturns true if the bit has changed.
pub fn merge(&mut self, all: &BitVector<C>) -> bool[src]
pub fn merge(&mut self, all: &BitVector<C>) -> boolpub fn grow(&mut self, num_bits: C)[src]
pub fn grow(&mut self, num_bits: C)ⓘImportant traits for BitVectorIter<'a, C>pub fn iter<'a>(&'a self) -> BitVectorIter<'a, C>[src]
ⓘImportant traits for BitVectorIter<'a, C>
pub fn iter<'a>(&'a self) -> BitVectorIter<'a, C>Iterates over indexes of set bits in a sorted order
Trait Implementations
impl<C: Clone + Idx> Clone for BitVector<C>[src]
impl<C: Clone + Idx> Clone for BitVector<C>fn clone(&self) -> BitVector<C>[src]
fn clone(&self) -> BitVector<C>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<C: Debug + Idx> Debug for BitVector<C>[src]
impl<C: Debug + Idx> Debug for BitVector<C>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<C: PartialEq + Idx> PartialEq for BitVector<C>[src]
impl<C: PartialEq + Idx> PartialEq for BitVector<C>fn eq(&self, other: &BitVector<C>) -> bool[src]
fn eq(&self, other: &BitVector<C>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &BitVector<C>) -> bool[src]
fn ne(&self, other: &BitVector<C>) -> boolThis method tests for !=.
impl<C: Idx> FromIterator<bool> for BitVector<C>[src]
impl<C: Idx> FromIterator<bool> for BitVector<C>