Skip to main content

Crate lazier_static

Crate lazier_static 

Source
Expand description

§lazier_static

A thin wrapper around std::sync::OnceLock providing cached, static, lazy initialization.

use lazier_static::*;
 
lazier_static! {
    fn hello_world() -> &str {
        "Hello, World!"
    }
}

//...

fn main() {
    println!("{}", hello_world());
}

§License

MIT OR Apache-2.0

Macros§

__lazier_static_inner
lazier_static