pub type OnceCell<T> = OnceCell<T>;Available on crate feature
once_cell only.Expand description
A thread-safe cell which can be written to only once.
Note: We use once_cell here because std::sync::OnceLock::get_or_try_init() is not yet stable.
Once it’s stabilized, we can switch to std::sync::OnceLock.
Aliased Type§
pub struct OnceCell<T>(/* private fields */);