flatMapResource<R> method

ResourceTry<R> flatMapResource<R>(
  1. ResourceTry<R> transform(
    1. SuccessT value
    )
)

Implementation

ResourceTry<R> flatMapResource<R>(
    ResourceTry<R> Function(SuccessT value) transform) {
  if (isSuccess) {
    return transform(getOrThrow());
  } else {
    return ResourceTry.failure(exceptionOrNull()!);
  }
}