InteractorAssisting

@MainActor
public protocol InteractorAssisting<InteractorType, ContentType>

This protocol represents an assistant which helps a Destination make requests of an Interactor. Concrete assistants conforming to this protocol should handle requests for a specific Interactor type.

  • An enum which defines types of Interactors. Each Destination may have its own Interactor types.

    Declaration

    Swift

    associatedtype InteractorType : InteractorTypeable
  • A configuration model which defines an Interactor request.

    Declaration

    Swift

    associatedtype Request : InteractorRequestConfiguring
  • A content type associated with the Interactor.

    Declaration

    Swift

    associatedtype ContentType : ContentTypeable
  • The type of Interactor.

    Declaration

    Swift

    @MainActor
    var interactorType: InteractorType { get }
  • The type of action requested of the Interactor.

    Declaration

    Swift

    @MainActor
    var actionType: Request.ActionType { get }
  • requestMethod Default implementation

    A type that represents whether the Interactor request should be made using concurrency or not.

    Default Implementation

    Declaration

    Swift

    @MainActor
    var requestMethod: InteractorRequestMethod { get }
  • Handles a request to an Interactor. Responses to the Interactor should be handled using the completionClosure closure.

    Declaration

    Swift

    @MainActor
    func handleRequest<Destination>(destination: Destination, content: ContentType?) where Destination : Destinationable, Self.InteractorType == Destination.InteractorType

    Parameters

    destination

    The Destination which the Interactor is associated with. This reference is used to make requests to the Interactor.

    content

    An optional content model used to make a request to the Interactor.