macro_rules! bitbuffer {
(@bit 0) => { ... };
(@bit 1) => { ... };
() => { ... };
(0) => { ... };
(1) => { ... };
($elem:expr; $n:expr) => { ... };
($($x:expr),+ $(,)?) => { ... };
($($bit:tt)+) => { ... };
}Expand description
A macro for constructing bit-buffers akin to vec![..].
Supports multiple syntaxes:
bitbuffer![]- empty bufferbitbuffer![value; count]- fill with valuebitbuffer![expr, expr, ...]- comma-separated boolean expressionsbitbuffer![0 1 0 1]- space-separated bit literals (0s and 1s)