mapErr<F extends Object> method

  1. @override
Result<T, F> mapErr<F extends Object>(
  1. F op(
    1. E
    )
)
override

Maps a Result<T, E> to Result<T, F> by applying a function to a contained Err value, leaving an Ok value untouched.

This function can be used to pass through a successful result while handling an error.

Implementation

@override
Result<T, F> mapErr<F extends Object>(F Function(E) op) => Err(op(_err));