when<R> method
Invokes either ok
or err
depending on the result.
Identical to match except that the arguments are named.
Implementation
@override
R when<R>({required R Function(T) ok, required R Function(E) err}) =>
err(_err);