A ValueProvider that may or may not produce a value.
Adds a Cancel() function that resolves the pending future with std::nullopt.
Public Member Functions | |
| OptionalValueProvider (OptionalValueProvider &&)=default | |
| OptionalValueProvider & | operator= (OptionalValueProvider &&other) |
| OptionalValueProvider (const OptionalValueProvider &)=delete | |
| OptionalValueProvider & | operator= (const OptionalValueProvider &)=delete |
| OptionalValueFuture< T > | Get () |
| template<typename... Args> | |
| void | Resolve (Args &&... args) |
Resolves the pending ValueFuture by constructing it in-place. | |
| void | Cancel () |
Resolves the pending ValueFuture with std::nullopt. | |
|
inline |
Returns a ValueFuture that will be completed when Resolve or Cancel is called.