ActionSequenceConduiting
@MainActor
public protocol ActionSequenceConduiting<ContentType>
A protocol that defines a conduit between steps in an action sequence.
Conduit objects that conform to this protocol receive the output of the current sequence step action and optionally transform the output into a data form the next action can use the next action in the sequence, before then injecting the output into the next step in the sequence.
-
Undocumented
Declaration
Swift
associatedtype ContentType : ContentTypeable -
The next action to be performed after this conduit processes its input.
Declaration
Swift
@MainActor var outputAction: (any ActionPerformable<ContentType>)? { get set } -
An optional transformer that converts the output of the current action sequence step before forwarding it to
outputAction.Declaration
Swift
@MainActor var transformer: (any ContentTransformable<ContentType, ContentType>)? { get set } -
receive(input:AsynchronoussequenceOutputs: ) Receives the current sequence step’s output and forwards it to the next action in the sequence.
Declaration
Swift
@MainActor func receive(input: ContentType, sequenceOutputs: ActionCollectionResults<ContentType>) async -> Result<ActionCollectionResults<ContentType>, Error>Parameters
inputThe output of the current sequence step’s action which should be passed to the next action in the sequence.
sequenceOutputsThe accumulated responses from all previously completed steps in the sequence.
Return Value
A
Resultcontaining the updatedActionSequenceResponseson success, or anErroron failure.
View on GitHub