Struct async_once_cell::ConstLazy [−][src]
pub struct ConstLazy<T, F> { /* fields omitted */ }Expand description
A value which is initialized on the first access.
Note: This structure may be larger in size than Lazy, but it does not allocate on the heap until it is first polled, so is suitable for initializing statics.
Implementations
Creates a new lazy value with the given initializing future.
Gets the value without blocking or starting the initialization.
Gets the value without blocking or starting the initialization.
This requires mutable access to self, so rust’s aliasing rules prevent any concurrent access and allow violating the usual rules for accessing this cell.
Gets the value if it was set.