Skip to content

//reactivestate-core/com.ensody.reactivestate/OneTimeEvent

OneTimeEvent

interface OneTimeEvent<T>

Simple synchronous one-time event. Once trigger is called, subsequent observe calls are triggered immediately.

This is not a stream of multiple events. That’s what Channel and Flow would be used for, instead. This kind of event can be activated exactly once and then it stays active forever.

Inheritors

DefaultOneTimeEvent

Functions

Name Summary
observe [common]
abstract fun observe(block: T.() -> Unit)
trigger [common]
abstract fun trigger(source: T)
unobserve [common]
abstract fun unobserve(block: T.() -> Unit)