Lazy

Type Alias Lazy 

Source
pub type Lazy<T, F = fn() -> T> = Lazy<T, Spin, F>;
Expand description

A type for lazy initialization of e.g. global static variables, which provides the same functionality as the lazy_static! macro.

This type uses spin-locks if the initialization is contended and is thus #[no_std] compatible.

For the API of this type alias, see the API of the generic Lazy type.

Aliased Typeยง

pub struct Lazy<T, F = fn() -> T> { /* private fields */ }