Invokes action with the data if this is a Success. Returns this for chaining.
action
this
Result<T> onSuccess(void Function(T data) action) { if (this case Success<T>(:final data)) action(data); return this; }