Macro data_encoding_macro::decode_slice [] [src]

macro_rules! decode_slice {
    ($($arg: tt)*) => { ... };
}

Defines a compile-time byte slice by decoding a string literal

This macro takes a list of key: value, pairs (the last comma is required). It takes the key-value pairs specifying the encoding to use to decode the input (see new_encoding for the possible key-value pairs), the input itself keyed by input, and the output keyed by name.

Examples

#![feature(use_extern_macros)]
#[macro_use]
extern crate data_encoding_macro;

const OCTAL: &'static [u8] = &decode_slice!{
    symbols: "01234567",
    padding: '=',
    input: "237610==",
};