Macro byte_strings::const_as_bytes[][src]

macro_rules! const_as_bytes {
    ($s : expr $(,) ?) => { ... };
}
Expand description

const-friendly version of as_bytes!.

#[macro_use]
extern crate byte_strings;

const MESSAGE: &str = "Hello, World!";
const MESSAGE_BYTES: &[u8] = const_as_bytes!(MESSAGE);