failure

@JvmName(name = "failure")
inline fun <T> failure(exception: Throwable): Result<T>(source)

Returns an instance that encapsulates the given Throwable as failure.

Since Kotlin

1.3