Folds the two cases of this Result into a single new Result.
Result<Object> fold( @noFutures Result<Object>? Function(Ok<T> ok) onOk, @noFutures Result<Object>? Function(Err<T> err) onErr, );