macro_rules! encode_string {
($s:expr) => { ... };
}
Expand description
Encodes s
such that it can be unambiguously encoded from
the beginning.
This is the same thing as encode_string
, but evaluates to
a constant &[u8]
.
ยงExample
use sha3_utils::encode_string;
let s = encode_string!(b"hello, world!");
assert_eq!(
s,
&[
1, 104,
104, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33,
],
);