AssistantAssigning
@MainActor
public protocol AssistantAssigning
A narrow, type-erased entry point for assigning an interactor assistant to a Destination.
This exists so callers holding any InteractorConfiguring<InteractorType> can dispatch the assignment without exposing the configuration’s Interactor associated type (and the Interactor.Request.ResultData == Destination.ContentType constraint that would otherwise be required at the call site).
-
Attempts to assign an interactor assistant for the given event type.
The implementation should runtime-check that
assistantis a compatibleInteractorAssistingfor this destination’sInteractorType/ContentTypeand thateventTypematches itsEventTypebefore assigning.Declaration
Swift
@discardableResult @MainActor func tryAssignInteractorAssistant(_ assistant: any Sendable, for eventType: any Hashable) -> BoolReturn Value
trueif the assignment succeeded,falseif the types didn’t match.
View on GitHub