Crates.io | simple-lazy |
lib.rs | simple-lazy |
version | 0.1.0 |
source | src |
created_at | 2023-12-05 07:35:24.518719 |
updated_at | 2023-12-05 07:35:24.518719 |
description | 40 Lines wrapper of std OnceLock |
homepage | |
repository | https://github.com/scroll-tech/simple-lazy |
max_upload_size | |
id | 1058398 |
size | 17,110 |
A 40 lines wrapper of std::once::OnceLock
that allows you to lazily initialize a value.
Most code is copied from once_cell
but replace the implementation of once_cell OnceCell
with std OnceLock
.
This crate is guaranteed to compile on stable Rust 1.70 and up.
It might be changed since once_cell_try
is not stable yet.