_SequenceMany
ReducerBuilder.swift:121struct _SequenceMany<Element> where Element : Reducer
struct _SequenceMany<Element> where Element : Reducer
s22ComposableArchitecture14ReducerBuilderO13_SequenceManyV
What are these?4IOVR
import ComposableArchitecture
The Composable Architecture (TCA, for short) is a library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind. It can be used in SwiftUI, UIKit, and more, and on any Apple platform (iOS, macOS, tvOS, and watchOS).
@resultBuilder enum ReducerBuilder<State, Action>
A result builder for combining reducers into a single reducer by running each, one after the other, and merging their effects.
protocol Reducer<State, Action>
A protocol that describes how to evolve the current state of an application to the next state, given an action, and describes what Effect
s should be executed later by the store, if any.
static func buildArray(_ reducers: [some Reducer<State, Action>]) -> some Reducer<State, Action>
static func buildBlock() -> some Reducer<State, Action>
static func buildBlock<R>(_ reducer: R) -> R where State == R.State, Action == R.Action, R : Reducer
static func buildEither<R0, R1>(first reducer: R0) -> _Conditional<R0, R1> where State == R0.State, Action == R0.Action, R0 : Reducer, R1 : Reducer, R0.Action == R1.Action, R0.State == R1.State
static func buildEither<R0, R1>(second reducer: R1) -> _Conditional<R0, R1> where State == R0.State, Action == R0.Action, R0 : Reducer, R1 : Reducer, R0.Action == R1.Action, R0.State == R1.State
static func buildExpression(_ expression: any Reducer<State, Action>) -> Reduce<State, Action>
static func buildExpression<R>(_ expression: R) -> R where State == R.State, Action == R.Action, R : Reducer
static func buildFinalResult<R>(_ reducer: R) -> R where State == R.State, Action == R.Action, R : Reducer
static func buildLimitedAvailability(_ wrapped: some Reducer<State, Action>) -> Reduce<State, Action>
static func buildOptional<R>(_ wrapped: R?) -> R? where State == R.State, Action == R.Action, R : Reducer
static func buildPartialBlock<R0, R1>(accumulated: R0, next: R1) -> _Sequence<R0, R1> where State == R0.State, Action == R0.Action, R0 : Reducer, R1 : Reducer, R0.Action == R1.Action, R0.State == R1.State
static func buildPartialBlock<R>(first: R) -> R where State == R.State, Action == R.Action, R : Reducer
enum _Conditional<First, Second> where First : Reducer, Second : Reducer, First.Action == Second.Action, First.State == Second.State
struct _Sequence<R0, R1> where R0 : Reducer, R1 : Reducer, R0.Action == R1.Action, R0.State == R1.State
func reduce(into state: inout Element.State, action: Element.Action) -> Effect<Element.Action>
var body: Body { get }
A non-existent body.
@warn_unqualified_access func _printChanges(_ printer: _ReducerPrinter<State, Action>? = .customDump) -> _PrintChangesReducer<Self>
Enhances a reducer with debug logging of received actions and state mutations for the given printer.
@warn_unqualified_access func dependency<Value>(_ value: Value) -> _DependencyKeyWritingReducer<Self> where Value : TestDependencyKey, Value == Value.Value
Places a value in the reducer’s dependencies.
@warn_unqualified_access func dependency<Value>(_ keyPath: WritableKeyPath<DependencyValues, Value>, _ value: Value) -> _DependencyKeyWritingReducer<Self>
Sets the dependency value of the specified key path to the given value.
func forEach<DestinationState, DestinationAction>(_ state: WritableKeyPath<State, StackState<DestinationState>>, action: CaseKeyPath<Action, StackAction<DestinationState, DestinationAction>>) -> some ReducerOf<Self> where DestinationState : CaseReducerState, DestinationAction == DestinationState.StateReducer.Action
A special overload of Reducer/forEach(_:action:destination:fileID:filePath:line:column:)-9svqb
for enum reducers.
@warn_unqualified_access func forEach<DestinationState, DestinationAction, Destination>(_ toStackState: WritableKeyPath<State, StackState<DestinationState>>, action toStackAction: AnyCasePath<Action, StackAction<DestinationState, DestinationAction>>, @ReducerBuilder<DestinationState, DestinationAction> destination: () -> Destination, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> some Reducer<State, Action> where DestinationState == Destination.State, DestinationAction == Destination.Action, Destination : Reducer
@warn_unqualified_access func forEach<DestinationState, DestinationAction, Destination>(_ toStackState: WritableKeyPath<State, StackState<DestinationState>>, action toStackAction: CaseKeyPath<Action, StackAction<DestinationState, DestinationAction>>, @ReducerBuilder<DestinationState, DestinationAction> destination: () -> Destination, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> some Reducer<State, Action> where DestinationState == Destination.State, DestinationAction == Destination.Action, Destination : Reducer
Embeds a child reducer in a parent domain that works on elements of a navigation stack in parent state.
@warn_unqualified_access func forEach<ElementState, ElementAction, ID, Element>(_ toElementsState: WritableKeyPath<State, IdentifiedArray<ID, ElementState>>, action toElementAction: AnyCasePath<Action, (ID, ElementAction)>, @ReducerBuilder<ElementState, ElementAction> element: () -> Element, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> some Reducer<State, Action> where ElementState == Element.State, ElementAction == Element.Action, ID : Hashable, ID : Sendable, Element : Reducer
@warn_unqualified_access func forEach<ElementState, ElementAction, ID, Element>(_ toElementsState: WritableKeyPath<State, IdentifiedArray<ID, ElementState>>, action toElementAction: CaseKeyPath<Action, IdentifiedAction<ID, ElementAction>>, @ReducerBuilder<ElementState, ElementAction> element: () -> Element, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> some Reducer<State, Action> where ElementState == Element.State, ElementAction == Element.Action, ID : Hashable, ID : Sendable, Element : Reducer
Embeds a child reducer in a parent domain that works on elements of a collection in parent state.
@warn_unqualified_access func ifCaseLet<CaseState, CaseAction, Case>(_ toCaseState: CaseKeyPath<State, CaseState>, action toCaseAction: CaseKeyPath<Action, CaseAction>, @ReducerBuilder<CaseState, CaseAction> then case: () -> Case, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> _IfCaseLetReducer<Self, Case> where CaseState == Case.State, CaseAction == Case.Action, Case : Reducer, Self.Action : CasePathable, Self.State : CasePathable
Embeds a child reducer in a parent domain that works on a case of parent enum state.
@warn_unqualified_access func ifCaseLet<CaseState, CaseAction, Case>(_ toCaseState: AnyCasePath<State, CaseState>, action toCaseAction: AnyCasePath<Action, CaseAction>, @ReducerBuilder<CaseState, CaseAction> then case: () -> Case, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> some Reducer<State, Action> where CaseState == Case.State, CaseAction == Case.Action, Case : Reducer
func ifLet<ChildState, ChildAction>(_ state: WritableKeyPath<State, PresentationState<ChildState>>, action: CaseKeyPath<Action, PresentationAction<ChildAction>>) -> some ReducerOf<Self> where ChildState : CaseReducerState, ChildAction == ChildState.StateReducer.Action
A special overload of Reducer/ifLet(_:action:destination:fileID:filePath:line:column:)-4ub6q
for enum reducers.
@warn_unqualified_access func ifLet<DestinationState, DestinationAction, Destination>(_ toPresentationState: WritableKeyPath<State, PresentationState<DestinationState>>, action toPresentationAction: AnyCasePath<Action, PresentationAction<DestinationAction>>, @ReducerBuilder<DestinationState, DestinationAction> destination: () -> Destination, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> some Reducer<State, Action> where DestinationState == Destination.State, DestinationAction == Destination.Action, Destination : Reducer
@warn_unqualified_access func ifLet<DestinationState, DestinationAction, Destination>(_ toPresentationState: WritableKeyPath<State, PresentationState<DestinationState>>, action toPresentationAction: CaseKeyPath<Action, PresentationAction<DestinationAction>>, @ReducerBuilder<DestinationState, DestinationAction> destination: () -> Destination, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> some Reducer<State, Action> where DestinationState == Destination.State, DestinationAction == Destination.Action, Destination : Reducer
Embeds a child reducer in a parent domain that works on an optional property of parent state.
@warn_unqualified_access func ifLet<WrappedState, WrappedAction>(_ toWrappedState: WritableKeyPath<State, WrappedState?>, action toWrappedAction: AnyCasePath<Action, WrappedAction>, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> _IfLetReducer<Self, EmptyReducer<WrappedState, WrappedAction>> where WrappedState : _EphemeralState
@warn_unqualified_access func ifLet<DestinationState, DestinationAction>(_ toPresentationState: WritableKeyPath<State, PresentationState<DestinationState>>, action toPresentationAction: AnyCasePath<Action, PresentationAction<DestinationAction>>, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> some Reducer<State, Action> where DestinationState : _EphemeralState
@warn_unqualified_access func ifLet<DestinationState, DestinationAction>(_ toPresentationState: WritableKeyPath<State, PresentationState<DestinationState>>, action toPresentationAction: CaseKeyPath<Action, PresentationAction<DestinationAction>>, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> some Reducer<State, Action> where DestinationState : _EphemeralState
A special overload of Reducer/ifLet(_:action:destination:fileID:filePath:line:column:)-4ub6q
for alerts and confirmation dialogs that does not require a child reducer.
@warn_unqualified_access func ifLet<WrappedState, WrappedAction>(_ toWrappedState: WritableKeyPath<State, WrappedState?>, action toWrappedAction: CaseKeyPath<Action, WrappedAction>, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> some Reducer<State, Action> where WrappedState : _EphemeralState
A special overload of Reducer/ifLet(_:action:then:fileID:filePath:line:column:)-2r2pn
for alerts and confirmation dialogs that does not require a child reducer.
@warn_unqualified_access func ifLet<WrappedState, WrappedAction, Wrapped>(_ toWrappedState: WritableKeyPath<State, WrappedState?>, action toWrappedAction: AnyCasePath<Action, WrappedAction>, @ReducerBuilder<WrappedState, WrappedAction> then wrapped: () -> Wrapped, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> some Reducer<State, Action> where WrappedState == Wrapped.State, WrappedAction == Wrapped.Action, Wrapped : Reducer
@warn_unqualified_access func ifLet<WrappedState, WrappedAction, Wrapped>(_ toWrappedState: WritableKeyPath<State, WrappedState?>, action toWrappedAction: CaseKeyPath<Action, WrappedAction>, @ReducerBuilder<WrappedState, WrappedAction> then wrapped: () -> Wrapped, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) -> some Reducer<State, Action> where WrappedState == Wrapped.State, WrappedAction == Wrapped.Action, Wrapped : Reducer
Embeds a child reducer in a parent domain that works on an optional property of parent state.
func onChange<V, R>(of toValue: @escaping (State) -> V, @ReducerBuilder<Self.State, Self.Action> _ reducer: @escaping (_ oldValue: V, _ newValue: V) -> R) -> _OnChangeReducer<Self, V, R> where V : Equatable, R : Reducer, Self.Action == R.Action, Self.State == R.State
Adds a reducer to run when this reducer changes the given value in state.
@warn_unqualified_access func signpost(_ prefix: String = "", log: OSLog = OSLog(
subsystem: "co.pointfree.ComposableArchitecture",
category: "Reducer Instrumentation"
)) -> _SignpostReducer<Self>
Instruments a reducer with signposts.
@warn_unqualified_access func transformDependency<V>(_ keyPath: WritableKeyPath<DependencyValues, V>, transform: @escaping (_ dependency: inout V) -> Void) -> _DependencyKeyWritingReducer<Self>
Transform a reducer’s dependency value at the specified key path with the given function.
func onChange<V, R>(of toValue: @escaping (State) -> V, removeDuplicates isDuplicate: @escaping (V, V) -> Bool, @ReducerBuilder<Self.State, Self.Action> _ reducer: @escaping (_ oldValue: V, _ newValue: V) -> R) -> _OnChangeReducer<Self, V, R> where R : Reducer, Self.Action == R.Action, Self.State == R.State
Adds a reducer to run when this reducer changes the given value in state.