ActionPerformableCollection
@MainActor
public protocol ActionPerformableCollection<ContentType> : ActionPerformable
A protocol that defines a collection of ActionPerformable objects that can be run together, such as a sequence or group.
Conforming types manage an ordered or grouped set of actions sharing the same ContentType, and are responsible for performing them and accumulating their results into an ActionCollectionResults object.
-
Adds an action to the collection.
Throws
invalidConfigurationif the action is not compatible with this collection.Note
This uses untyped
throwsrather thanthrows(ActionError<ContentType>)because the typed throws combination with this existential might be causing issues with Swift 6.0 and 6.1 builds.Declaration
Swift
@MainActor func add(action: any ActionPerformable<ContentType>) throwsParameters
actionThe
ActionPerformableobject to add to this collection.
View on GitHub