Action

@MainActor
public final class Action<InteractorType, ContentType> : ActionPerformable where InteractorType : InteractorTypeable, ContentType : ContentTypeable

This object represents a single action in an ActionPerformableCollection object. The actual work done is handled by an Interactor; this object calls asyncRequestForAction(destination:actionType:content:resultTransformer:) on its assistant, and upon completion adds its result to a results array it passes along to this step’s output conduit. If there is no conduit attached, it will assume the sequence is completed and return all results. If the action’s task is cancelled an cancelled(partialResults:) error will be returned; if the interactor returns a failure an ActionError/failed(partialResults:) error will be returned, both with the accumulated results that completed previously in the sequence.

Note

Generally you should not create this object directly. Instead, ActionConfiguration objects should be used to represent sequence steps in conjunction with an ActionSequenceConfiguration object.