AnySideEffectContext
public protocol AnySideEffectContext
Type erasure for SideEffectContext
See also
SideEffectContext
-
Type erased dependencies of the side effect
Declaration
Swift
var anyDependencies: SideEffectDependencyContainer { get } -
Type erased function that returns the current configuration of the state
Declaration
Swift
func getAnyState() -> StateReturn Value
the type erased current configuration of the state
-
Dispatches a
Dispatchable. It will essentially call theanyDispatchmethod of the backing store.Declaration
Swift
@discardableResult func anyDispatch(_ dispatchable: Dispatchable) -> Promise<Any>Parameters
dispatchablethe item to dispatch
Return Value
a promise that is resolved when the store finishes handling the dispatched item
-
dispatch(_:Default implementation) Dispatches a
AnySideEffect.Default Implementation
Default implementation of the
dispatch<T: ReturningSideEffect>Declaration
Swift
@discardableResult func dispatch<T>(_ dispatchable: T) -> Promise<Void> where T : AnySideEffectParameters
dispatchablethe
AnySideEffectto dispatchReturn Value
a promise that is resolved with the value returned by the side effect when the store finishes handling the dispatched item
-
Dispatches a
AnyStateUpdater.Declaration
Swift
@discardableResult func dispatch<T>(_ dispatchable: T) -> Promise<Void> where T : AnyStateUpdaterParameters
dispatchablethe side effect to dispatch
Return Value
a promise that is resolved when the store finishes updating the state
-
Dispatches a
ReturningSideEffectDeclaration
Swift
@discardableResult func dispatch<T>(_ dispatchable: T) -> Promise<T.ReturnValue> where T : ReturningSideEffectParameters
dispatchablethe
ReturningSideEffectto dispatchReturn Value
a promise that is resolved with the value returned by the side effect when the store finishes handling the dispatched item
View on GitHub
AnySideEffectContext Protocol Reference