InterceptableRouter
@MainActor
public protocol InterceptableRouter : Router
The router implementing this protocol should support global tasks.
-
Adds
RoutingInterceptorinstanceDeclaration
Swift
@MainActor mutating func add<RI>(_ interceptor: RI) where RI : RoutingInterceptor, RI.Context == Any?Parameters
interceptorThe
RoutingInterceptorinstance to be executed byRouterbefore routing to this step. -
Adds ContextTask instance
Declaration
Swift
@MainActor mutating func add<CT>(_ contextTask: CT) where CT : ContextTask, CT.Context == Any?, CT.ViewController == UIViewControllerParameters
contextTaskThe
ContextTaskinstance to be applied by aRouterimmediately after it will find or createUIViewController. -
Adds PostRoutingTask instance
Declaration
Swift
@MainActor mutating func add<PT>(_ postTask: PT) where PT : PostRoutingTask, PT.Context == Any?Parameters
postTaskThe
PostRoutingTaskinstance to be executed by aRouterafter routing to this step.