ActionConfiguring
@MainActor
public protocol ActionConfiguring<InteractorType, ContentType>
This protocol represents an object that can be used to configure an Action for use in an ActionPerformableCollection object.
-
Undocumented
Declaration
Swift
associatedtype InteractorType : InteractorTypeable -
Undocumented
Declaration
Swift
associatedtype ActionType : InteractorRequestActionTypeable -
Undocumented
Declaration
Swift
associatedtype ContentType : ContentTypeable -
interactorTypeDefault implementationThe interactor type associated with this configuration, if any.
Default Implementation
Declaration
Swift
@MainActor var interactorType: InteractorType? { get } -
The type of Interactor action type.
Declaration
Swift
@MainActor var actionType: ActionType { get } -
The type of Interactor assistant.
Declaration
Swift
@MainActor var assistant: InteractorAssistantType { get } -
The output conduit to be used to pass this action’s output to the next action.
Declaration
Swift
@MainActor var outputConduit: (any ActionSequenceConduiting<ContentType>)? { get set } -
identifierDefault implementationAn optional type tagging this step, carried onto its
ActionResponseso the response can be located in anActionSequenceResponsesobject. Defaults tonil.Default Implementation
Declaration
Swift
@MainActor var identifier: (any ActionIdentifying)? { get } -
Determines whether on failure the action should cancel its parent task.
Declaration
Swift
@MainActor var shouldEndParentTaskOnFailure: Bool { get } -
Determines whether the result of this action should be saved and returned in the collection’s
ActionCollectionResultsobject. This won’t prevent the result from being passed through itsoutputConduitto the next action. Setting this property tofalsecan be helpful in cases where you don’t want to retain content that takes up a large amount of memory, such as an image retrieved from a server.Declaration
Swift
@MainActor var shouldSaveResult: Bool { get } -
Builds the interactor assistant this configuration’s step will use to make its request. Building the assistant here allows access to the concrete Interactor type, which is erased at the sequence level.
This is used both to build a standalone
Actionand to build the child assistants of anActionGroup.Declaration
Swift
@MainActor func buildAssistant() throws -> any AsyncInteractorAssisting<InteractorType, ContentType>Return Value
An async interactor assistant for this configuration’s action.
-
Builds a runnable sequence step from this configuration, also constructing the Interactor assistant the step will use to make its request. Building the assistant here allows access to the concrete Interactor type, which is erased at the sequence level.
Declaration
Swift
@MainActor func buildAction(resultHandler: any InteractorResultHandling<InteractorType, ContentType>) throws -> any ActionPerformable<ContentType>Parameters
resultHandlerThe object which should handle the results of the step’s interactor request.
Return Value
A
Resultcontaining the step, or a failure if the configured assistant is incompatible with this configuration’s types.
View on GitHub