MiddlewareReader

extension MiddlewareReader
  • Undocumented

    Declaration

    Swift

    public func liftToCollection<ItemInputActionType, ItemOutputActionType, ItemStateType, GlobalAction, GlobalState, CollectionState>(
        inputAction actionMap: @escaping (GlobalAction) -> ElementIDAction<ItemStateType.ID, ItemInputActionType>?,
        outputAction outputMap: @escaping (ElementIDAction<ItemStateType.ID, ItemOutputActionType>) -> GlobalAction,
        stateCollection: @escaping (GlobalState) -> CollectionState
    ) -> MiddlewareReader<Dependencies, EffectMiddleware<GlobalAction, GlobalAction, GlobalState, Dependencies>>
    where CollectionState: MutableCollection,
          CollectionState.Element == ItemStateType,
          MiddlewareType == EffectMiddleware<ItemInputActionType, ItemOutputActionType, ItemStateType, Dependencies>,
          ItemStateType: Identifiable
  • Undocumented

    Declaration

    Swift

    public func liftToCollection<ItemActionType, ItemStateType, GlobalAction, GlobalState, CollectionState: MutableCollection>(
        action actionMap: WritableKeyPath<GlobalAction, ElementIDAction<ItemStateType.ID, ItemActionType>?>,
        stateCollection: KeyPath<GlobalState, CollectionState>
    ) -> MiddlewareReader<Dependencies, EffectMiddleware<GlobalAction, GlobalAction, GlobalState, Dependencies>>
    where CollectionState.Element == ItemStateType,
          MiddlewareType == EffectMiddleware<ItemActionType, ItemActionType, ItemStateType, Dependencies>,
          ItemStateType: Identifiable