[][src]Macro hexchat::safe_static

macro_rules! safe_static {
    ($(#[$attr:meta])* static lazy $N:ident : $T:ty = $e:expr; $($t:tt)*) => { ... };
    ($(#[$attr:meta])* pub static lazy $N:ident : $T:ty = $e:expr; $($t:tt)*) => { ... };
    ($(#[$attr:meta])* pub ($($vis:tt)+) static lazy $N:ident : $T:ty = $e:expr; $($t:tt)*) => { ... };
    ($(#[$attr:meta])* static uninit $N:ident : $T:ty; $($t:tt)*) => { ... };
    ($(#[$attr:meta])* pub static uninit $N:ident : $T:ty; $($t:tt)*) => { ... };
    ($(#[$attr:meta])* pub ($($vis:tt)+) static uninit $N:ident : $T:ty; $($t:tt)*) => { ... };
    () => { ... };
}

A macro for creating SafeLazys and SafeUninits.

Important

Any thread which accesses a safe static, mutex or no, must be killed inside your plugin's Drop implementation. To allow otherwise is undefined.