| Crates.io | lazier_static |
| lib.rs | lazier_static |
| version | 0.1.2 |
| created_at | 2024-05-30 10:49:21.103624+00 |
| updated_at | 2024-05-30 11:06:36.039819+00 |
| description | A thin wrapper around `std::sync::OnceLock` providing cached, static, lazy initialization. |
| homepage | https://github.com/skull-squadron/lazier_static |
| repository | https://github.com/skull-squadron/lazier_static |
| max_upload_size | |
| id | 1256775 |
| size | 4,314 |
A thin layer around std::sync::OnceLock providing cached, lazy, static initialization.
use lazier_static::*;
lazier_static! {
fn hello_world() -> &str {
"Hello, World!"
}
fn number() -> i32 {
10 * 32
}
}
fn main() {
println!("{}", number());
}
cargo commandcargo add lazier_static
lazier_static = "0.1.2"
MIT OR Apache-2.0