[][src]Macro binjs_shared::const_with_str

macro_rules! const_with_str {
    (
        $(#[$outer:meta])*
        $(const $const_name: ident: $ty: ty = $init: expr;)*
        mod $mod_name: ident;
    ) => { ... };
}

From a set of macro definitions, derive a module with a set of matching &'static str.

Example:


const_with_str! {
   const FOO: usize = 0;
   mod my_strings;
}

will produce


const FOO: usize = 0;
mod my_strings {
  const FOO: &'static str = "0";
}