Package-level declarations

Types

Link copied to clipboard
abstract class AsyncStreamWrapper<WRAPPED, RESULT>(wrapped: Stream<WRAPPED>, mapper: suspend (WRAPPED) -> RESULT?) : StreamWrapperBase<WRAPPED, RESULT?>

Base class for stream wrappers that map the value type from WRAPPED to RESULT

Link copied to clipboard
interface Stream<T>

Base interface for all streams

Link copied to clipboard
class StreamCombinator<FIRST, SECOND, RESULT>(first: Stream<FIRST>, second: Stream<SECOND>, combine: (FIRST, SECOND) -> RESULT) : Stream<RESULT>

Operator that combines two streams.

Link copied to clipboard
typealias StreamHandler<T> = (T) -> Unit

Handler-function for the incoming values of a Stream.

Link copied to clipboard
open class StreamMapper<WRAPPED, RESULT>(wrapped: Stream<WRAPPED>, mapper: (WRAPPED) -> RESULT, initial: () -> RESULT = { mapper(wrapped()) }) : StreamWrapperBase<WRAPPED, RESULT>

Base class for stream wrappers that map the value type from WRAPPED to RESULT

Link copied to clipboard
interface StreamSource<T> : Stream<T>

Define a stream source to which new values can be written.

Link copied to clipboard
open class StreamSourceImpl<T>(initial: T) : StreamSource<T>
Link copied to clipboard
interface StreamStorage<T>

Define a storage backend for a persistent stream

Link copied to clipboard
abstract class StreamWrapper<T>(wrapped: Stream<T>) : StreamWrapperBase<T, T>

Base class for stream wrappers that keep the value type

Link copied to clipboard
abstract class StreamWrapperBase<WRAPPED, RESULT>(wrapped: Stream<WRAPPED>) : Stream<RESULT>

Base class for all stream wrappers

Link copied to clipboard
typealias Unsubscribe = () -> Unit

The Unsubscribe function is returned when a subscription is created on a Stream.

Functions

Link copied to clipboard
fun <T> Stream<T>.asFlow(): Flow<T>

Converts the Stream into a Flow

Link copied to clipboard
fun <T> Stream<T>.permanent(): Stream<T>
fun <T> Stream<T>.permanent(handler: (T) -> Unit): Stream<T>

Subscribes to the stream permanently