macro_rules! byte_set {
($($byte:expr,)*) => { ... };
($($byte:expr),*) => { ... };
}
Creates a ByteSet
from a sequence of u8
s.
byte_set!
allows ByteSet
s to be defined with the same syntax as vec!
or array expressions.
This can be used within a const
context:
const SET: ByteSet = byte_set!(1, 2, 3, b'a', b'b', b'c');
assert!(SET.contains(b'a'));