fold

inline fun <T, R> KrosstalkResult<T>.fold(onSuccess: (KrosstalkResult.Success<T>) -> R, onHttpError: (KrosstalkResult.HttpError) -> R, onServerException: (KrosstalkResult.ServerException) -> R): R
inline fun <T, R> KrosstalkResult<T>.fold(onSuccess: (KrosstalkResult.Success<T>) -> R, onFailure: (KrosstalkResult.Failure) -> R): R

Get a value depending on the type of result.