Action

  • Action represents a repeatable work like SignalProducer. But on top of the isolation of produced Signals from a SignalProducer, Action provides higher-order features like availability and mutual exclusion.

    Similar to a produced Signal from a SignalProducer, each unit of the repreatable work may output zero or more values, and terminate with or without an error at some point.

    The core of Action is the execute closure it created with. For every execution attempt with a varying input, if the Action is enabled, it would request from the execute closure a customized unit of work — represented by a SignalProducer. Specifically, the execute closure would be supplied with the latest state of Action and the external input from apply().

    Action enforces serial execution, and disables the Action during the execution.

    See more

    Declaration

    Swift

    public final class Action<Input, Output, Error> where Error : Error
    extension Action: BindingTargetProvider
  • ActionError represents the error that could be emitted by a unit of work of a certain Action.

    See more

    Declaration

    Swift

    public enum ActionError<Error> : Swift.Error where Error : Error
    extension ActionError: Equatable where Error: Equatable