macro_rules! byte_array_struct {
(
$visibility:vis struct $name:ident ($num:expr);
) => { ... };
}
Expand description
Produces byte-array based struct
byte_array_struct!(
// 24 is the size of the struct in bytes
pub struct Address(24);
);
let foo = Address::default();
let foo = Address::from_str("0x00112233445566778899aabbccddeeff0123456789abcdef").unwrap();