Represents an asynchronous Option that is wrapped in a PromiseLike.
This is similar to AsyncOption<T> but uses PromiseLike instead of Promise,
allowing compatibility with any thenable object.
Type Parameters
T
The type of the value that may be contained in the Some variant.
Since
1.8.0
Example
// Works with any PromiseLike, not just Promise constthenable: AsyncLikeOption<number> = { then(resolve) { resolve(Some(42)); } };
Represents an asynchronous
Optionthat is wrapped in aPromiseLike. This is similar toAsyncOption<T>but usesPromiseLikeinstead ofPromise, allowing compatibility with any thenable object.