[][src]Macro bv::bit_vec

macro_rules! bit_vec {
    ( $e:expr ; $n:expr ) => { ... };
    ( $( $e:expr ),* ) => { ... };
    ( $( $e:expr, )* ) => { ... };
}

Like vec! but for BitVec.

The bit_vec! macro creates a BitVec literal. It takes two forms:

Examples

use bv::*;

fn main() {
    let mut bv1: BitVec = bit_vec![ true; 3 ];
    let     bv2: BitVec = bit_vec![ true, false, true ];

    assert_ne!(bv1, bv2);
    bv1.set_bit(1, false);
    assert_eq!(bv1, bv2);
}