macro_rules! b64 { () => { ... }; ($($s:literal)+) => { ... }; }
Expand description
Converts a sequence of string literals containing hex-encoded data
into a new B64
at compile time.
If the input is empty, a zero-initialized array is returned.
Note that the strings cannot be prefixed with 0x
.
See hex!
for more information.
§Examples
use alloy_primitives::{b64, B64};
const ZERO: B64 = b64!();
assert_eq!(ZERO, B64::ZERO);
let byte_array: B64 = b64!("0123abcd…");