Success

data class Success<T>(val value: T) : ConfigResult<T> (source)

The config loaded and passed validation.

Constructors

Link copied to clipboard
constructor(value: T)

Properties

Link copied to clipboard
val value: T

Functions

Link copied to clipboard
fun getOrElse(fallback: T): T

The value, or fallback on failure.

Link copied to clipboard
fun getOrNull(): T?

The value, or null on failure.

Link copied to clipboard
fun getOrThrow(): T

The value, or throws ConfigException with all the errors.

Link copied to clipboard
fun <R> map(transform: (T) -> R): ConfigResult<R>

Transforms the value of a Success; a Failure is returned unchanged.

Link copied to clipboard

Runs action with the errors if this is a Failure, then returns this result.