-
-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
-
get_or_try_init -
get_mut -
get_mut_or_init -
get_mut_or_try_init -
set -
try_insert -
take
You can refer to:
- https://github.com/tokio-rs/tokio/blob/master/tokio/src/sync/once_cell.rs
- https://doc.rust-lang.org/std/sync/struct.OnceLock.html
- impl get_mut_or_init and get_mut_or_try_init for OnceCell and OnceLock rust-lang/rust#114788
Also, it's possible to add a LazyCell primitive that has a pre-configured initializer (closure).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed