StreamSourceImpl

open class StreamSourceImpl<T>(initialValue: T) : StreamSource<T>

Constructors

Link copied to clipboard
fun <T> StreamSourceImpl(initialValue: T)

Functions

Link copied to clipboard
open operator override fun invoke(): T
open operator override fun invoke(next: T)

open operator fun invoke(block: (T) -> T)

Calls the block with the current value of the stream and sends to return value to the stream.

Link copied to clipboard
open fun modify(block: T.() -> T)

Modifies the current value by calling the block and sends it the result as the next value.

Link copied to clipboard
open override fun removeAllSubscriptions()
Link copied to clipboard
open override fun subscribeToStream(sub: StreamHandler<T>): Unsubscribe

Properties

Link copied to clipboard
open val readonly: Stream<T>

Get the readonly version of this stream.

Link copied to clipboard
open override val subscriptions: MutableSet<(T) -> Unit>

All subscriptions to the stream