onFailure abstract method

Result<S, F> onFailure(
  1. void onFailure(
    1. F failure
    )
)

Performs the given action on the encapsulated Throwable exception if this instance represents failure. Returns the original Result unchanged.

Implementation

Result<S, F> onFailure(
  void Function(F failure) onFailure,
);