Package-level declarations

Types

Link copied to clipboard
value class Failure<out Error : Any>(val error: Error) : Outcome<Nothing, Error>

A failed Outcome.

Link copied to clipboard
typealias Faulty<Error> = Outcome<Unit, Error>

Alias for a Outcome used when only the Error information is important.

Link copied to clipboard
typealias FaultyFlow<Error> = Flow<Faulty<Error>>

Alias for a flow of a faulty result.

Link copied to clipboard
typealias FaultyScope<Error> = RaiseScope<Error>.() -> Unit

Alias for a RaiseScope context runner used for Faulty.

Link copied to clipboard
typealias Maybe<Ok> = Outcome<Ok, Unit>

Alias for a Outcome used when only the Ok information is important.

Link copied to clipboard
typealias MaybeFlow<Ok> = Flow<Maybe<Ok>>

Alias for a flow of a maybe result.

Link copied to clipboard
typealias MaybeScope<Ok> = RaiseScope<Any>.() -> Ok

Alias for a RaiseScope context runner used for Maybe.

Link copied to clipboard
sealed interface Outcome<out Ok : Any, out Error : Any>

Represents either a Success or Failure state.

Link copied to clipboard
typealias OutcomeFlow<Ok, Error> = Flow<Outcome<Ok, Error>>

Alias for a flow of an outcome result.

Link copied to clipboard
typealias OutcomeScope<Ok, Error> = RaiseScope<Error>.() -> Ok

Alias for a RaiseScope context runner used for Outcome.

Link copied to clipboard
value class Success<out Ok : Any>(val value: Ok) : Outcome<Ok, Nothing>

A successful Outcome.