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

    invalidConfiguration if the action is not compatible with this collection.

    Note

    This uses untyped throws rather than throws(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>) throws

    Parameters

    action

    The ActionPerformable object to add to this collection.