hex_to_u8_array

Macro hex_to_u8_array 

Source
macro_rules! hex_to_u8_array {
    (
        [$($bytes:expr),* $(,)?]
    ) => { ... };
    (
        $expr_for_string:expr
    ) => { ... };
}
Expand description

Converts a byte array or hex stream into a Vec<u8>.

hex_to_u8_array! {
    [0x01, 0x02, 0x03, 0x04]
}
// or
hex_to_u8_array! {
  "01020304" // any valid expressions that results in &str
}