AsyncInteractable

public protocol AsyncInteractable<Request, ResultData> : Interactable, Actor

This protocol represents an Interactor actor. Interactors provide an interface to perform some business logic, often acting as a datasource by interfacing with an API, handling system APIs, or some other self-contained work.

  • perform(request:) Asynchronous

    Requests the interactor to perform an async operation.

    Declaration

    Swift

    func perform(request: Request) async -> Result<[ResultData], Error>

    Parameters

    request

    A configuration model which defines the request.

    Return Value

    A Result containing an array of items.