InteractorAssistantType
public enum InteractorAssistantType
This enum represents the type of assistant to be used in configuring an InterfaceAssisting interactor object.
-
The basic assistant type, a
DefaultInteractorAssistantassistant. This type can be used for most Interactor requests where the Request’s content type is the same as the Result’s content type. If you need to pass in content with the request, this type can also handle that automatically if the content’s type is the same as the Request’sRequestContentType.Declaration
Swift
case basic -
The basic assistant type for async interactors, a
DefaultAsyncInteractorAssistantassistant. This type can be used for most async Interactor requests where the Request’s content type is the same as the Result’s content type. If you need to pass in content with the request, this type can also handle that automatically if the content’s type is the same as the Request’sRequestContentType.Declaration
Swift
case basicAsync -
A basic async assistant type that bridges content types using the given transformers when the Interactor’s
Request.RequestContentType/Request.ResultDatadiffer from the Destination’sContentType. If you don’t need to do any custom logic in your assistant, in most cases you can just use this type if you only need to convert to and from the Interactor’s Request and Result content types to the Destination’sContentType.requestconverts a Destination’sContentTypeinto the Request’sRequestContentTypebefore a request is made. Only needed when the two differ; passnilto fall back to a direct cast, asbasicAsyncdoes.resultconverts the Interactor’sRequest.ResultDatainto the Destination’sContentTypeafter a request completes. Only needed when the two differ; passnilto fall back to a direct cast, asbasicAsyncdoes.
Passing
nilfor both is valid but behaves identically tobasicAsync.Declaration
Swift
case transformer(request: (any ContentTransformable)?, result: (any ContentTransformable)?) -
This type passes a custom assistant, used for configuring more advanced interactor requests that require supplying a model or other configuration needs.
Declaration
Swift
case custom(_: any InteractorAssisting)
View on GitHub