macro_rules! concat_bytes {
    ($($x: expr),+ $(,)?) => { ... };
}
Expand description

Concatenates values into a byte slice.

The input type must be one of

The output type is &[u8; _].

Examples

const S1: &[u8; 7] = const_str::concat_bytes!(b'A', b"BC", [68, b'E', 70], "G");
const S2: &[u8] = const_str::concat_bytes!(S1, "/123", 0u8);
assert_eq!(S1, b"ABCDEFG");
assert_eq!(S2, b"ABCDEFG/123\x00");