onFailure method
Performs the given action on the encapsulated Throwable exception if this instance represents failure. Returns the original Result unchanged.
Implementation
@override
Result<S, F> onFailure(void Function(F failure) onFailure) {
return this;
}