ActionResult

public struct ActionResult<ContentType> : Sendable where ContentType : ContentTypeable

This object defines the result of an Action.

  • An optional type identifying the step which produced this output, assigned when the step was configured. Used to locate a specific output in the sequence’s responses.

    Declaration

    Swift

    public let identifier: (any ActionIdentifying)?
  • What produced this response — a single Interactor action or a group of actions.

    Declaration

    Swift

    public let origin: ActionResponseOrigin<ContentType>
  • A convenience property for accessing the content of the result, if the action was successful. For a group, this is the value produced by the group’s SequenceGroupMerging object.

    Declaration

    Swift

    public let content: ContentType?
  • A Result object holding either the content of the result, or an error if the action failed. For a group, a successful result passes the value produced by the group’s SequenceGroupMerging object.

    Declaration

    Swift

    public let result: Result<ContentType, Error>
  • Undocumented

    Declaration

    Swift

    public init(identifier: (any ActionIdentifying)? = nil, origin: ActionResponseOrigin<ContentType>, result: Result<ContentType, Error>)
  • A convenience accessor for the Interactor action type of an .action result. Returns nil for a .group result.

    Declaration

    Swift

    public var action: (any InteractorRequestActionTypeable)? { get }