Macro cmd_lib::tls_init[][src]

macro_rules! tls_init {
    ($vis : vis $var : ident, $t : ty, $($var_init : tt) *) => { ... };
}
Expand description

Declare a new thread local storage variable

use std::collections::HashMap;
tls_init!(LEN, u32, 100);
tls_init!(MAP, HashMap<String, String>, HashMap::new());