WithJob

interface WithJob

Marks a class that it has a Job to start coroutines with.

Functions

Link copied to clipboard
open fun errorHandler(cause: Throwable)

Default error handler printing the error to console.

Link copied to clipboard
open infix fun <A> Flow<A>.handledBy(handler: Handler<A>)

Connects a Flow to a Handler.

open infix fun <A> Flow<A>.handledBy(execute: suspend (A) -> Unit): Job
open infix fun <E : Event> Flow<E>.handledBy(execute: suspend (E) -> Unit): Job

Connects a Flow to a suspendable execute function.

open infix fun <E : Event> Flow<E>.handledBy(handler: Handler<Unit>)

Connects Events to a Handler.

Link copied to clipboard
open operator fun Handler<Unit>.invoke()
open operator fun <A> Handler<A>.invoke(data: A)

Calls this handler exactly once.

Properties

Link copied to clipboard
abstract val job: Job

Job for launching coroutines in.

Inheritors

Link copied to clipboard
Link copied to clipboard