Struct rustc_data_structures::bitvec::BitArray [−][src]
pub struct BitArray<C: Idx> { /* fields omitted */ }
A very simple BitArray type.
It does not support resizing after creation; use BitVector
for that.
Methods
impl<C: Idx> BitArray<C>
[src]
impl<C: Idx> BitArray<C>
pub fn new(num_bits: usize) -> BitArray<C>
[src]
pub fn new(num_bits: usize) -> BitArray<C>
pub fn clear(&mut self)
[src]
pub fn clear(&mut self)
pub fn count(&self) -> usize
[src]
pub fn count(&self) -> usize
pub fn contains(&self, bit: C) -> bool
[src]
pub fn contains(&self, bit: C) -> bool
True if self
contains the bit bit
.
pub fn contains_all(&self, other: &BitArray<C>) -> bool
[src]
pub fn contains_all(&self, other: &BitArray<C>) -> bool
True 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) -> bool
pub fn insert(&mut self, bit: C) -> bool
[src]
pub fn insert(&mut self, bit: C) -> bool
Returns 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) -> bool
Returns true if the bit has changed.
pub fn merge(&mut self, all: &BitArray<C>) -> bool
[src]
pub fn merge(&mut self, all: &BitArray<C>) -> bool
ⓘImportant traits for BitIter<'a, C>pub fn iter<'a>(&'a self) -> BitIter<'a, C>
[src]
ⓘImportant traits for BitIter<'a, C>
pub fn iter<'a>(&'a self) -> BitIter<'a, C>
Iterates over indexes of set bits in a sorted order
Trait Implementations
impl<C: Clone + Idx> Clone for BitArray<C>
[src]
impl<C: Clone + Idx> Clone for BitArray<C>
fn clone(&self) -> BitArray<C>
[src]
fn clone(&self) -> BitArray<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 BitArray<C>
[src]
impl<C: Debug + Idx> Debug for BitArray<C>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<C: PartialEq + Idx> PartialEq for BitArray<C>
[src]
impl<C: PartialEq + Idx> PartialEq for BitArray<C>