Macro b512
macro_rules! b512 {
() => { ... };
($($s:literal)+) => { ... };
}
Expand description
Converts a sequence of string literals containing hex-encoded data
into a new B512
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::{b512, B512};
const ZERO: B512 = b512!();
assert_eq!(ZERO, B512::ZERO);
let byte_array: B512 = b512!("0123abcd…");