Macro smallbitvec::sbvec

source ยท
macro_rules! sbvec {
    ($elem:expr; $n:expr) => { ... };
    ($($x:expr),*) => { ... };
    ($($x:expr,)*) => { ... };
}
Expand description

Creates a SmallBitVec containing the arguments.

sbvec! allows SmallBitVecs to be defined with the same syntax as array expressions. There are two forms of this macro:

  • Create a SmallBitVec containing a given list of elements:
let v = sbvec![true, false, true];
assert_eq!(v[0], true);
assert_eq!(v[1], false);
assert_eq!(v[2], true);
let v = sbvec![true; 3];
assert!(v.into_iter().eq(vec![true, true, true].into_iter()));