Structures

The following structures are available globally.

  • A configuration object that defines an ActionBranch step for use within an ActionSequenceConfiguration.

    Build a branch by chaining .branch(when:action:transformer:) calls, then optionally adding .otherwise(action:transformer:) as a fallback that runs when no condition matches. This object evaluates branch path conditions in declaration order at runtime and runs the first matching path. Each path can carry an optional transformer that converts its output before the branch forwards it through the shared output conduit (assigned by ActionSequenceConfiguration‘s .output() method).

    let config = try ActionSequenceConfiguration<InteractorType, ContentType>()
        .step(
            ActionBranchConfiguration<InteractorType, ContentType>()
                .branch(when: HasImagesCondition(), action: processImageStep, transformer: ImageToFileTransformer())
                .branch(when: HasTextCondition(), action: processTextStep)
                .otherwise(defaultStep)
        )
        .output()
        .step(nextStep)
    

    Note

    ActionBranchConfiguration is value-typed; each chained call returns a modified copy.
    See more

    Declaration

    Swift

    @MainActor
    public struct ActionBranchConfiguration<InteractorType, ContentType> : ActionConfiguring where InteractorType : InteractorTypeable, ContentType : ContentTypeable
  • A single branching path in an ActionBranch, pairing a BranchConditionable condition with an action and an optional output transformer.

    When an ActionBranch performs, it evaluates each path’s condition in order and runs the first matching action. The path’s optional transformer converts the action’s output before the branch forwards the result through its output conduit to the next sequence step.

    Note

    Do not create these directly. Use ActionBranchConfiguration‘s .branch(when:action:transformer:) builder method, which constructs ActionBranchPath objects automatically when building the ActionBranch.

    See more

    Declaration

    Swift

    @MainActor
    public struct ActionBranchPath<ContentType> where ContentType : ContentTypeable
  • A configuration object that pairs a ActionBranchCondition with an action configuration and an optional transformer, representing one path of an ActionBranchConfiguration.

    Use ActionBranchConfiguration‘s .branch(when:action:transformer:) builder method to add these to a branch configuration rather than constructing them directly.

    See more

    Declaration

    Swift

    @MainActor
    public struct ActionBranchPathConfiguration<InteractorType, ContentType> where InteractorType : InteractorTypeable, ContentType : ContentTypeable
  • This object contains results of the actions which completed in an ActionPerformableCollection, in the order they ran, with one result per sequence step or group.

    See more

    Declaration

    Swift

    @MainActor
    public struct ActionCollectionResults<ContentType> : Sendable where ContentType : ContentTypeable
  • An object which configures and builds an Action in an ActionSequence. These configuration objects should be used in conjunction with an ActionSequenceConfiguration object, representing either a single sequence step, or a group of actions defined by an ActionSequenceGroupConfiguration object.

    See more

    Declaration

    Swift

    @MainActor
    public struct ActionConfiguration<InteractorType, ContentType, Interactor> : ActionConfiguring where InteractorType : InteractorTypeable, ContentType : ContentTypeable, Interactor : AbstractInteractable
  • Configures a group of Interactor actions which an ActionGroup runs in parallel as a single step in an ActionSequence.

    Each child configuration makes its own Interactor request; when all have completed, the supplied SequenceGroupMerging object merges their results into a single content value which is passed on through the group’s output conduit. Children can cancel the group’s task on a per-child basis with GroupStepConfiguration‘s shouldEndParentTaskOnFailure property.

    See more

    Declaration

    Swift

    @MainActor
    public struct ActionGroupConfiguration<InteractorType, ContentType> : InteractorConfiguring, ActionCollectionConfiguring where InteractorType : InteractorTypeable, ContentType : ContentTypeable
  • This object defines the result of an Action.

    See more

    Declaration

    Swift

    public struct ActionResult<ContentType> : Sendable where ContentType : ContentTypeable
  • This object provides a unidirectional flow along an ActionSequence chain of Actions, optionally transforming output data from the previous Action before sending it on to the next Action.

    See more

    Declaration

    Swift

    @MainActor
    public struct ActionSequenceConduit<ContentType> : ActionSequenceConduiting where ContentType : ContentTypeable
  • A configuration object that defines an ordered sequence of actions to be executed by an ActionSequence.

    Sequence steps are added using step(_:inputTransformer:). Each call automatically wires an output conduit from the previously added step to the new one; the optional inputTransformer converts the previous step’s output before this new step receives it.

    let config = ActionSequenceConfiguration<MyInteractor, MyContent>()
        .step(stepA)
        .step(stepB, inputTransformer: myTransformer)
    

    Note

    ActionSequenceConfiguration is value-typed; each chained call returns a modified copy.

    See more

    Declaration

    Swift

    @MainActor
    public struct ActionSequenceConfiguration<InteractorType, ContentType> : InteractorConfiguring, ActionCollectionConfiguring where InteractorType : InteractorTypeable, ContentType : ContentTypeable

    Parameters

    InteractorType

    The interactor type used to perform each action, constrained to InteractorTypeable.

    ContentType

    The content type passed between steps, constrained to ContentTypeable.

  • A branch condition that passes only when all of its child conditions pass (logical AND).

    See more

    Declaration

    Swift

    @MainActor
    public struct AllSatisfyCondition<ContentType> : BranchConditionable where ContentType : ContentTypeable
  • A branch condition that passes when at least one of its child conditions passes (logical OR).

    Use .negated() on an AnySatisfyCondition to select a path when none of the child conditions match.

    See more

    Declaration

    Swift

    @MainActor
    public struct AnySatisfyCondition<ContentType> : BranchConditionable where ContentType : ContentTypeable
  • A branch condition that tests a single Boolean value.

    Pass a Boolean value to test its value at construction time. A true value passes the condition. Chaining .negated() to it turns the value expectation to false for the condition to pass.

    See more

    Declaration

    Swift

    @MainActor
    public struct BooleanCondition<ContentType> : BranchConditionable where ContentType : ContentTypeable
  • This model provides closures which drive a custom Destination presentation.

    See more

    Declaration

    Swift

    public struct CustomPresentation<DestinationType, ContentType, TabType> where DestinationType : RoutableDestinations, ContentType : ContentTypeable, TabType : TabTypeable
  • A default assistant to be used to configure async interactor actions. This assistant passes along the given action type and optional content along with the request to the Interactor. If the incoming content is the same type as the Request’s RequestContentType, it is also passed to the request’s init(action:content:) initializer, otherwise no content is passed in.

    If the Interactor’s Request.RequestContentType/Request.ResultData differ from ContentType, supply inputTransformer/outputTransformer to bridge them instead of relying on the direct cast — this is what backs transformer(request:result:).

    See more

    Declaration

    Swift

    @MainActor
    public struct DefaultAsyncInteractorAssistant<InteractorType, Request, ContentType> : AsyncInteractorAssisting where InteractorType : InteractorTypeable, Request : InteractorRequestConfiguring, ContentType : ContentTypeable
  • A default assistant to be used to configure Interactor actions. This assistant passes along the given action type and optional content with the request to the interactor. If the incoming content is the same type as the Request’s RequestContentType, it’s also passed to the request’s init(action:content:) initializer, otherwise no content is passed in.

    See more

    Declaration

    Swift

    @MainActor
    public struct DefaultInteractorAssistant<InteractorType, Request, ContentType> : InteractorAssisting where InteractorType : InteractorTypeable, Request : InteractorRequestConfiguring, ContentType : ContentTypeable
  • This model is used to send data with system navigation events.

    See more

    Declaration

    Swift

    public struct SystemNavigationOptions
  • This model is used to configure a specific action an Interactor should take.

    See more

    Declaration

    Swift

    @MainActor
    public struct InteractorConfiguration<InteractorType, Interactor> : InteractorConfiguring where InteractorType : InteractorTypeable, Interactor : AbstractInteractable
  • Represents an action to be taken when a user interacts with a particular interface element.

    See more

    Declaration

    Swift

    public struct InterfaceAction<EventType, DestinationType, ContentType> : Equatable, Hashable where EventType : EventTypeable, DestinationType : RoutableDestinations, ContentType : ContentTypeable
  • A model which provides data for an interface action to configure a presentation.

    See more

    Declaration

    Swift

    public struct InterfaceActionData<DestinationType, ContentType> where DestinationType : RoutableDestinations, ContentType : ContentTypeable
  • An options model that configures how a Destination is presented within a navigation stack, either within a NavigationStack in SwiftUI or a UINavigationController in UIKit.

    See more

    Declaration

    Swift

    public struct NavigationStackPresentationOptions

NegatedCondition

  • A condition that produces the logical inverse of a wrapped BranchConditionable.

    Obtain one via .negated() on any condition rather than constructing this type directly.

    See more

    Declaration

    Swift

    @MainActor
    public struct NegatedCondition<ContentType> : BranchConditionable where ContentType : ContentTypeable
  • A type-erased box wrapping any object conforming to ContentTransformable for a specific ContentType.

    Action doesn’t know the concrete Request.ResultData type of the Interactor whose assistant it holds. That type only exists at ActionConfiguration‘s generic scope where the Interactor assistant is built. ContentTransformerWrapper bridges that gap: ActionConfiguration wraps a typed ContentTransformable object in the wrapper and Action stores it.

    Internally this stores the wrapped transformer inside a generic ConcreteContentTransformerBox, dispatched through the ContentTransformerBox witness table, which lets this type conform to Sendable unconditionally.

    See more

    Declaration

    Swift

    @MainActor
    public struct ContentTransformerWrapper<ContentType> : Sendable where ContentType : ContentTypeable
  • An options model used in conjunction with SheetPresentationType to customize UIKit and SwiftUI modal sheet presentations.

    See more

    Declaration

    Swift

    public struct SheetPresentationOptions
  • A model used to facilitate UIKit and SwiftUI presentations of a Destination in a split view interface.

    See more

    Declaration

    Swift

    public struct SplitViewColumn
  • This View provides a way to display a View that is fed from an external binding.

    See more

    Declaration

    Swift

    @MainActor
    public struct BindableContainerView : View, Identifiable
  • Provides a wrapper for a SwiftUI View, useful for passing Views in models.

    See more

    Declaration

    Swift

    @MainActor
    public struct ContainerView<Content> : View, Identifiable, Equatable where Content : View
  • A model used for presenting a SwiftUI sheet element.

    See more

    Declaration

    Swift

    public struct Sheet : Sheetable
  • A ViewModifier that adds a custom back button for NavigationStack views, which allows integration with NavigatingViewDestinationable-conforming Views.

    See more

    Declaration

    Swift

    @MainActor
    public struct BackNavigationModifier : ViewModifier
  • A ViewModifier that handles the removal of a Destination from the Destinations ecosystem when its associated View disappears from a NavigationStack.

    See more

    Declaration

    Swift

    @MainActor
    public struct DestinationDisappearModifier<DestinationType, ContentType, TabType> : ViewModifier where DestinationType : RoutableDestinations, ContentType : ContentTypeable, TabType : TabTypeable
  • This SwiftUI ViewModifier manages the presentation of a sheet.

    See more

    Declaration

    Swift

    @MainActor
    public struct SheetPresenter : ViewModifier
  • A model providing configuration options for SwiftUI sheet presentations.

    See more

    Declaration

    Swift

    public struct ViewSheetPresentationOptions
  • A model providing configuration options for UIKit sheet presentations.

    See more

    Declaration

    Swift

    public struct ControllerSheetPresentationOptions