OptionMapFilterAsyncX<T extends Object> extension

Collection of method for async map and filter in a Option

on

Methods

filterAsync(FutureOr<bool> predicate(T)) Future<Option<T>>
Returns None if the option is None, otherwise calls predicate with the wrapped value and returns:
mapAsync<U extends Object>(FutureOr<U> op(T)) Future<Option<U>>
Maps an Option<T> to Option<U> by applying an asynchronous function to a contained Some value. Otherwise returns a None.
mapOrAsync<U>(FutureOr<U> op(T), U opt) Future<U>
Applies an asynchronous function to the contained value (if any), or returns the provided default (if not).
mapOrElseAsync<U>(FutureOr<U> op(T), FutureOr<U> def()) Future<U>
Maps an Option<T> to U by applying an asynchronous function to a contained T value, or computes a default (if not).