Structures
The following structures are available globally.
-
A configuration object that defines an
ActionBranchstep for use within anActionSequenceConfiguration.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 byActionSequenceConfiguration‘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)See moreNote
ActionBranchConfigurationis value-typed; each chained call returns a modified copy.Declaration
Swift
@MainActor public struct ActionBranchConfiguration<InteractorType, ContentType> : ActionConfiguring where InteractorType : InteractorTypeable, ContentType : ContentTypeable -
A single branching path in an
ActionBranch, pairing aBranchConditionablecondition with an action and an optional output transformer.When an
ActionBranchperforms, 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.See moreNote
Do not create these directly. Use
ActionBranchConfiguration‘s.branch(when:action:transformer:)builder method, which constructsActionBranchPathobjects automatically when building theActionBranch.Declaration
Swift
@MainActor public struct ActionBranchPath<ContentType> where ContentType : ContentTypeable -
A configuration object that pairs a
ActionBranchConditionwith an action configuration and an optional transformer, representing one path of anActionBranchConfiguration.Use
See moreActionBranchConfiguration‘s.branch(when:action:transformer:)builder method to add these to a branch configuration rather than constructing them directly.Declaration
Swift
@MainActor public struct ActionBranchPathConfiguration<InteractorType, ContentType> where InteractorType : InteractorTypeable, ContentType : ContentTypeable -
This object contains results of the actions which completed in an
See moreActionPerformableCollection, in the order they ran, with one result per sequence step or group.Declaration
Swift
@MainActor public struct ActionCollectionResults<ContentType> : Sendable where ContentType : ContentTypeable -
An object which configures and builds an
See moreActionin anActionSequence. These configuration objects should be used in conjunction with anActionSequenceConfigurationobject, representing either a single sequence step, or a group of actions defined by anActionSequenceGroupConfigurationobject.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
ActionGroupruns in parallel as a single step in anActionSequence.Each child configuration makes its own Interactor request; when all have completed, the supplied
See moreSequenceGroupMergingobject 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 withGroupStepConfiguration‘sshouldEndParentTaskOnFailureproperty.Declaration
Swift
@MainActor public struct ActionGroupConfiguration<InteractorType, ContentType> : InteractorConfiguring, ActionCollectionConfiguring where InteractorType : InteractorTypeable, ContentType : ContentTypeable -
This object defines the result of an Action.
See moreDeclaration
Swift
public struct ActionResult<ContentType> : Sendable where ContentType : ContentTypeable -
This object provides a unidirectional flow along an
See moreActionSequencechain of Actions, optionally transforming output data from the previous Action before sending it on to the next Action.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 optionalinputTransformerconverts the previous step’s output before this new step receives it.let config = ActionSequenceConfiguration<MyInteractor, MyContent>() .step(stepA) .step(stepB, inputTransformer: myTransformer)See moreNote
ActionSequenceConfigurationis value-typed; each chained call returns a modified copy.Declaration
Swift
@MainActor public struct ActionSequenceConfiguration<InteractorType, ContentType> : InteractorConfiguring, ActionCollectionConfiguring where InteractorType : InteractorTypeable, ContentType : ContentTypeableParameters
InteractorTypeThe interactor type used to perform each action, constrained to
InteractorTypeable.ContentTypeThe content type passed between steps, constrained to
ContentTypeable. -
A branch condition that passes only when all of its child
See moreconditionspass (logical AND).Declaration
Swift
@MainActor public struct AllSatisfyCondition<ContentType> : BranchConditionable where ContentType : ContentTypeable -
A branch condition that passes when at least one of its child
conditionspasses (logical OR).Use
See more.negated()on anAnySatisfyConditionto select a path when none of the child conditions match.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
See moretruevalue passes the condition. Chaining.negated()to it turns the value expectation tofalsefor the condition to pass.Declaration
Swift
@MainActor public struct BooleanCondition<ContentType> : BranchConditionable where ContentType : ContentTypeable -
This model provides closures which drive a custom Destination presentation.
See moreDeclaration
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’sinit(action:content:)initializer, otherwise no content is passed in.If the Interactor’s
See moreRequest.RequestContentType/Request.ResultDatadiffer fromContentType, supplyinputTransformer/outputTransformerto bridge them instead of relying on the direct cast — this is what backstransformer(request:result:).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
See moreRequestContentType, it’s also passed to the request’sinit(action:content:)initializer, otherwise no content is passed in.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 moreDeclaration
Swift
public struct SystemNavigationOptions -
This model is used to configure a specific action an Interactor should take.
See moreDeclaration
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 moreDeclaration
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 moreDeclaration
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
See moreNavigationStackin SwiftUI or aUINavigationControllerin UIKit.Declaration
Swift
public struct NavigationStackPresentationOptions
-
A condition that produces the logical inverse of a wrapped
BranchConditionable.Obtain one via
See more.negated()on any condition rather than constructing this type directly.Declaration
Swift
@MainActor public struct NegatedCondition<ContentType> : BranchConditionable where ContentType : ContentTypeable -
A type-erased box wrapping any object conforming to
ContentTransformablefor a specificContentType.Actiondoesn’t know the concreteRequest.ResultDatatype of the Interactor whose assistant it holds. That type only exists atActionConfiguration‘s generic scope where the Interactor assistant is built.ContentTransformerWrapperbridges that gap:ActionConfigurationwraps a typedContentTransformableobject in the wrapper andActionstores it.Internally this stores the wrapped transformer inside a generic
See moreConcreteContentTransformerBox, dispatched through theContentTransformerBoxwitness table, which lets this type conform toSendableunconditionally.Declaration
Swift
@MainActor public struct ContentTransformerWrapper<ContentType> : Sendable where ContentType : ContentTypeable -
An options model used in conjunction with
See moreSheetPresentationTypeto customize UIKit and SwiftUI modal sheet presentations.Declaration
Swift
public struct SheetPresentationOptions -
A model used to facilitate UIKit and SwiftUI presentations of a Destination in a split view interface.
See moreDeclaration
Swift
public struct SplitViewColumn -
This
See moreViewprovides a way to display aViewthat is fed from an external binding.Declaration
Swift
@MainActor public struct BindableContainerView : View, Identifiable -
Provides a wrapper for a SwiftUI
See moreView, useful for passingViews in models.Declaration
Swift
@MainActor public struct ContainerView<Content> : View, Identifiable, Equatable where Content : View -
A
See moreViewModifierthat adds a custom back button forNavigationStackviews, which allows integration withNavigatingViewDestinationable-conforming Views.Declaration
Swift
@MainActor public struct BackNavigationModifier : ViewModifier -
A
See moreViewModifierthat handles the removal of a Destination from the Destinations ecosystem when its associatedViewdisappears from aNavigationStack.Declaration
Swift
@MainActor public struct DestinationDisappearModifier<DestinationType, ContentType, TabType> : ViewModifier where DestinationType : RoutableDestinations, ContentType : ContentTypeable, TabType : TabTypeable -
This SwiftUI
See moreViewModifiermanages the presentation of a sheet.Declaration
Swift
@MainActor public struct SheetPresenter : ViewModifier -
A model providing configuration options for SwiftUI sheet presentations.
See moreDeclaration
Swift
public struct ViewSheetPresentationOptions -
A model providing configuration options for UIKit sheet presentations.
See moreDeclaration
Swift
public struct ControllerSheetPresentationOptions
View on GitHub
Structures Reference