Registry / utility / lazy-static

lazy-static

JSON →
library1.5.0rscratesunverified

A macro for declaring lazily evaluated statics in Rust.

# Cargo.toml [dependencies] lazy_static = "1.5.0"
INSTALL
IMPORT
SIG · LAZY-STATIC
L
lazy-static
utilityrustv1.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

lazy_static
use lazy_static::lazy_static;

Declare a lazily evaluated static variable.

use lazy_static::lazy_static; lazy_static! { static ref MY_STATIC: Vec<u32> = vec![1, 2, 3]; } fn main() { println!("{:?}", *MY_STATIC); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.5.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
lazy-static — cargo add lazy-static · libregistry