ResolveResult

sealed class ResolveResult<out T>(source)

The outcome of resolving one field. Used by generated code.

Inheritors

Types

Link copied to clipboard
class Error(val error: ConfigError) : ResolveResult<Nothing>

The field failed with error.

Link copied to clipboard
class Success<T>(val value: T) : ResolveResult<T>

The field resolved to value.

Functions

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

The value, or fallback on error.

Link copied to clipboard
fun getOrNull(): T?

The value, or null on error.

Link copied to clipboard
fun onError(action: (ConfigError) -> Unit): ResolveResult<T>

Runs action with the error if this is an Error, then returns this result.