EXTENSION

PrimitiveSequenceType

Methods

dispatch(action:on:mode:fillOnError:)

func dispatch<A: CompletableAction>(action: A.Type,
                                    on dispatcher: Dispatcher,
                                    mode: Dispatcher.DispatchMode.UI = .async,
                                    fillOnError errorPayload: A.Payload? = nil)
    -> Disposable where A.Payload == Self.Element

Dispatches an given action from the result of the Single trait. This is only usable when the Action is a CompletableAction.

Parameters

Name Description
action The CompletableAction type to be dispatched.
dispatcher The Dispatcher object that will dispatch the action.
mode The Dispatcher dispatch mode, .async by default.
fillOnError The payload that will replace the action’s payload in case of failure.

dispatch(action:key:on:mode:fillOnError:)

func dispatch<A: KeyedCompletableAction>(action: A.Type,
                                         key: A.Key,
                                         on dispatcher: Dispatcher,
                                         mode: Dispatcher.DispatchMode.UI = .async,
                                         fillOnError errorPayload: A.Payload? = nil)
    -> Disposable where A.Payload == Self.Element

Dispatches an given action from the result of the Single trait. This is only usable when the Action is a CompletableAction.

Parameters

Name Description
action The CompletableAction type to be dispatched.
key The key associated with the Task result.
dispatcher The Dispatcher object that will dispatch the action.
mode The Dispatcher dispatch mode, .async by default.
fillOnError The payload that will replace the action’s payload in case of failure or nil.

action(_:fillOnError:)

func action<A: CompletableAction>(_ action: A.Type,
                                  fillOnError errorPayload: A.Payload? = nil)
    -> Single<A> where A.Payload == Self.Element

Builds a CompletableAction from a Single

Parameters

Name Description
action The CompletableAction type to be built.
fillOnError The payload that will replace the action’s payload in case of failure or nil.

dispatch(action:on:mode:)

func dispatch<A: EmptyAction>(action: A.Type,
                              on dispatcher: Dispatcher,
                              mode: Dispatcher.DispatchMode.UI = .async)
    -> Disposable

Dispatches an given action from the result of the Completable trait. This is only usable when the Action is an EmptyAction.

Parameters

Name Description
action The CompletableAction type to be dispatched.
dispatcher The Dispatcher object that will dispatch the action.
mode The Dispatcher dispatch mode, .async by default.

action(_:)

func action<A: EmptyAction>(_ action: A.Type)
    -> Single<A>

Builds an EmptyAction from a Completable

Parameters

Name Description
action The EmptyAction type to be built.