onSuccessSuspend

inline suspend fun <T> Result<T>.onSuccessSuspend(crossinline action: suspend (value: T) -> Unit): Result<T>

Author

skydoves (Jaewoong Eum)

Since

1.0.1

Performs the given suspend action on the encapsulated value if this instance represents success. Returns the original Result unchanged.

Parameters

action

Performs on the encapsulated value if this instance represents success.