failure

fun <T> failure(exception: Throwable): RestResult<T>(source)

Returns an instance that encapsulates the given Throwable as failure.