macro_rules! scope_local {
( $( $(#[$attr:meta])* $vis:vis static $name:ident: $ty:ty = $default:expr; )+ ) => { ... };
}Expand description
Define a scope-local item.
ยงExample
scope_local! {
/// An integer.
pub static MY_I32: i32 = 42;
/// An atomic integer.
pub static MY_ATOMIC_USIZE: AtomicUsize = AtomicUsize::new(0);
}