onSuccess

inline fun <T> ChannelResult<T>.onSuccess(action: (value: T) -> Unit): ChannelResult<T>(source)

Performs the given action on the encapsulated value if the operation succeeded. Returns the original ChannelResult unchanged.

A shorthand for this.also { if (isSuccess) action(getOrThrow()) }.