onSuccess

fun onSuccess(callback: (T) -> Unit): Result<T>

Convenience method to listen for Success.

Parameters

callback

that gets the data T.