Expand description
Shuttle’s implementation of the lazy_static
crate, v1.4.0.
Using this structure, it is possible to have static
s that require code to be executed at
runtime in order to be initialized. Lazy statics should be created with the
lazy_static!
macro.
§Warning about drop behavior
Shuttle’s implementation of lazy_static
will drop the static value at the end of an execution,
and so run the value’s Drop
implementation. The actual lazy_static
crate does not drop the
static values, so this difference may cause false positives.
To disable the warning printed about this issue, set the SHUTTLE_SILENCE_WARNINGS
environment
variable to any value, or set the silence_warnings
field of
Config
to true.
Re-exports§
pub use crate::lazy_static;
pub use crate::lazy_static;
Macros§
- lazy_
static - Declare a new lazy static value, like the
lazy_static
crate.
Structs§
- Lazy
- Shuttle’s implementation of
lazy_static::Lazy
(aka the unstablestd::lazy::Lazy
).
Traits§
- Lazy
Static - Support trait for enabling a few common operation on lazy static values.
Functions§
- initialize
- Takes a shared reference to a lazy static and initializes it if it has not been already.