onSuccess

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

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