Package-level declarations
Types
This is the Observer specifically for Swift
A function used to cancel Coroutines launched with InitializerContext.launch, ThunkContext.launch or ReducerContext.launch
Function to dispatch actions to a bloc. Dispatchers are used by Initializers and Thunks or ThunkNoActions to dispatch an action to the "next" thunk or reducer in the execution chain.
Function that returns the current state. GetState is used by thunks to retrieve the current state of the bloc and is accessible through the ThunkContext / ThunkContextNoAction.
Function that is executed when the bloc is created.
InitializerContext is used as receiver for an initializer:
Function to launch a coroutine from one of the contexts: InitializerContext, ThunkContext or ReducerContext
A StateStream and a Sink at the same time.
ReducerContext is used as receiver for the receiver when defining it with an action:
ReducerContextNoAction is used as receiver for the receiver defined MVVM+ style (no action):
Function that reduces state.
Function that emits a side effect.
Function that emits a side effect.
A SideEffectStream is a source of asynchronous (side effect) data. It's a hot stream meant to deal with SideEffect data (compared to StateStream for State).
A SideEffectStream emits:
all values even duplicates
no initial value upon subscription (analogous PublishSubject)
A StateStream emits:
no duplicate values
an initial value upon subscription (analogous BehaviorSubject)
Suspend function passed as parameter to one of the launch function calls: InitializerContext.launch, ThunkContext.launch or ReducerContext.launch
ThunkContext is used as receiver for the thunk when defining it with an action:
ThunkContextNoAction is used as receiver for the thunk defined MVVM+ style (no action):
Function that runs asynchronous code.
Functions
Extension function for InitializerContext to launch a coroutine and run a suspend function without exposing the bloc's CoroutineScope.
Extension function for ReducerContextNoAction to launch a coroutine and run a suspend function without exposing the bloc's CoroutineScope.
Extension function for ReducerContext to launch a coroutine and run a suspend function without exposing the bloc's CoroutineScope.
Extension function for ThunkContextNoAction to launch a coroutine and run a suspend function without exposing the bloc's CoroutineScope.
Extension function for ThunkContext to launch a coroutine and run a suspend function without exposing the bloc's CoroutineScope.
Analogous call for BlocObservableOwner
Call from a component to observe state and side effect updates in a BlocOwner (BlocOwner in Android is typically a ViewModel, the observing component a Fragment or an Activity):
Subscribes to the state and side effects streams of a Bloc.