InlineInterceptor

public struct InlineInterceptor<C> : RoutingInterceptor

InlineInterceptor

NB: It may be used for the purpose of configuration testing, but then replaced with a strongly typed RoutingInterceptor instance.

Methods

  • Constructor

    Declaration

    Swift

    public init(prepare prepareBlock: ((C) throws -> Void)? = nil, _ performBlock: @escaping (C, @escaping (RoutingResult) -> Void) -> Void)

    Parameters

    completion

    the block to be called when InlineInterceptor will take a control over the navigation process.

    NB For Router to be able to continue navigation process, completion block method MUST be called.

  • Constructor

    Declaration

    Swift

    public init(prepare prepareBlock: ((C) throws -> Void)? = nil, _ inlineBlock: @escaping (C) throws -> Void)

    Parameters

    completion

    the block to be called when InlineInterceptor will take a control over the navigation process.

    NB completion method will be called automatically, do not use this constructor if your interceptor task is asynchronous.

  • Declaration

    Swift

    public func prepare(with context: C) throws
  • Declaration

    Swift

    public func perform(with context: C, completion: @escaping (RoutingResult) -> Void)