FutureOptionExtension<T extends Object> extension

FutureOption represents an asynchronous Option. And as such, inherits all of Option's methods.

on

Methods

and<U extends Object>(Option<U> other) Future<Option<U>>
andThen<U extends Object>(FutureOr<Option<U>> f(T)) Future<Option<U>>
expect(String msg) Future<T>
filter(FutureOr<bool> predicate(T)) Future<Option<T>>
inspect(FutureOr<void> f(T)) Future<Option<T>>
isNone() Future<bool>
isSome() Future<bool>
isSomeAnd(FutureOr<bool> f(T)) Future<bool>
iter() Future<RIterator<T>>
map<U extends Object>(U f(T)) Future<Option<U>>
mapOr<U>(U defaultValue, U f(T)) Future<U>
mapOrElse<U>(U defaultFn(), U f(T)) Future<U>
okOr<E extends Object>(E err) Future<Result<T, E>>
okOrElse<E extends Object>(E errFn()) Future<Result<T, E>>
or(Option<T> other) Future<Option<T>>
orElse(Option<T> f()) Future<Option<T>>
toNullable() Future<T?>
unwrap() Future<T>
unwrapOr(T defaultValue) Future<T>
unwrapOrElse(T f()) Future<T>
xor(Option<T> other) Future<Option<T>>
zip<U extends Object>(Option<U> other) Future<Option<(T, U)>>
zipWith<U extends Object, R extends Object>(Option<U> other, R f(T, U)) Future<Option<R>>

Operators

operator [](_OptionEarlyReturnKey op) Future<T>