byteset

Macro byteset 

Source
macro_rules! byteset {
    () => { ... };
    ( $( $digit:expr ),* $(,)?) => { ... };
    ( $lower:expr ; $upper:expr ) => { ... };
}
Expand description

Construct a Bitset::<8, u8> with the provided integers.

ยงUsage

 
// list integers in the set
let bitset = byteset![1,2,4];
assert_eq!(*bitset, 0b_1011);
 
// provide bounds (inclusive) inclusive of range
let bitset = byteset![3; 7];
assert_eq!(*bitset, 0b_0111_1100);