ValueOrCompletion

sealed interface ValueOrCompletion<out T> : Serializable(source)

Represents a materialized Flow event.

Be careful about using this within SharedFlow or StateFlow as these values will be included in the replay cache.

See also

Inheritors

Types

Link copied to clipboard
class Completion(val throwable: Throwable? = null) : ValueOrCompletion<Nothing>
Link copied to clipboard
class Value<out T>(val value: T) : ValueOrCompletion<T>

Functions

Link copied to clipboard
open suspend fun <R> map(block: suspend (T) -> R): ValueOrCompletion<R>