pipe<T extends Object> abstract method
If this is a Success
, asynchronously maps S
to Result, otherwise returns F
untouched.
See bind for a synchronous variant of this function.
Future<String> stringifyAsync(int value) async => Failure(v.toString());
Success(1).pipe(stringifyAsync); // Failure('1')
Failure(2).pipe(stringifyAsync); // Failure(2)
Implementation
@useResult Future<Result<T, F>> pipe<T extends Object>(Future<Result<T, F>> Function(S success) function);