Struct async_once_cell::OnceFuture [−][src]
pub struct OnceFuture<T, F = Box<dyn Future<Output = T> + Send>, I = Infallible> { /* fields omitted */ }
Expand description
Implementations
Get mutable access to the initializer or final value.
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.
Creates a new OnceFuture directly from a Future.
The gen_future or init_future functions will never be called.
Create and run the future until it produces a result, then return a reference to that result.
Create and run the future until it produces a result, then return a reference to that result.
Create and run the future until it produces a result, then return a reference to that result.