Package-level declarations

Types

Link copied to clipboard
class DispatcherWorkRunner(dispatcher: CoroutineDispatcher) : WorkRunner

A WorkRunner that launches work on a CoroutineDispatcher.

Link copied to clipboard
interface ExecutionPolicy

Defines execution behavior of handler functions added to a subtypeEffectHandler.

Link copied to clipboard
object FlowMobius
Link copied to clipboard
fun interface FlowTransformer<I, O>
Link copied to clipboard
class SubtypeEffectHandlerBuilder<F : Any, E>(defaultExecutionPolicy: ExecutionPolicy)
Link copied to clipboard
data class UnknownEffectException(val effect: Any) : RuntimeException
Link copied to clipboard

Used to indicate that an FlowMobiusLoop transformer has received an kotlinx.coroutines.flow.catch call, which is illegal. This exception means Mobius is in an undefined state and should be considered a fatal programmer error.

Functions

Link copied to clipboard
Link copied to clipboard
fun <I, O> flowConnectable(transform: FlowTransformer<I, O>): Connectable<I, O>

Constructs a Connectable that applies transform to map a Flow of I into a Flow of O.

Link copied to clipboard
fun <I, O> flowTransformer(transformer: FlowTransformer<I, O>): FlowTransformer<I, O>
Link copied to clipboard
fun WorkRunners.fromDispatcher(dispatcher: CoroutineDispatcher): WorkRunner
Link copied to clipboard
fun <E> Flow<E>.toEventSource(scope: CoroutineScope): EventSource<E>

Create an EventSource that emits each E from this Flow.

Link copied to clipboard
fun <E> EventSource<E>.toFlow(): Flow<E>

Create a Flow that emits each E from this EventSource.

Link copied to clipboard
fun <I, O> Flow<I>.transform(connectable: Connectable<I, O>): Flow<O>

Transforms a Flow of I into a Flow of O using the provided Connectable.