Some

data class Some<out T> : Reply<T>

Properties

Link copied to clipboard

Returns true if the reply is Reply.None.

Link copied to clipboard
val value: T

Functions

Link copied to clipboard
fun <T> Reply<T>.getOrElse(default: () -> T): T

Returns the value of the Reply.Some instance, or the result of the default function if there is no reply yet (Reply.None).

Link copied to clipboard
fun <T> Reply<T>.getOrNull(): T?

Returns the value of the Reply.Some instance, or null if there is no reply yet (Reply.None).

Link copied to clipboard
fun <T> Reply<T>.getOrThrow(): T

Returns the value of the Reply.Some instance, or throws an error if there is no reply yet (Reply.None).

Link copied to clipboard
inline fun <T, R> Reply<T>.map(transform: (T) -> R): Reply<R>

Transforms the value of the Reply.Some instance using the provided transform function, or returns Reply.None if there is no reply yet (Reply.None).

Link copied to clipboard
inline fun <T> Reply<T>?.orNone(): Reply<T>

Returns the value of the Reply.Some instance, or the default value if there is no reply yet (Reply.None).