Crate hexbytes [] [src]

Byte array literals

This crate provides the hb! macro for creating fixed size byte arrays at compile time from hexadecimal byte literals.

#![feature(proc_macro)]
 
extern crate hexbytes;
use hexbytes::hb;
 
fn main() {
    let bytes = hb!("0bad abba cd");
}

Functions

hb

Decodes a string describing hex-bytes into a fixed [u8] array.