Struct fid::bit_array::BitArray[][src]

pub struct BitArray { /* fields omitted */ }

Methods

impl BitArray
[src]

Sets the bit at position i to b.

Examples

let mut ba = fid::BitArray::new(8);
ba.set_bit(3, true);
assert_eq!(ba.get_bit(3), true);
assert_eq!(ba.get_bit(4), false);

Gets the bit at position i.

Sets the i-th word of size word_size to word.

Examples

let mut ba = fid::BitArray::new(128);
ba.set_word(0, 12, 0b0101_1010_1100);
assert_eq!(ba.get_word(0, 12), 0b0101_1010_1100);
ba.set_word(5, 12, 0b1010_0101_0011);
assert_eq!(ba.get_word(5, 12), 0b1010_0101_0011);

Gets the i-th word of size word_size.

Resizes the array.

Trait Implementations

impl Debug for BitArray
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for BitArray

impl Sync for BitArray