URLMatcherGroup

public struct URLMatcherGroup<Route> where Route : RouteType

Maintains a list of URLMatchers, and some shortcuts to create groups.

Properties

Helper methods

  • Match some host.

    Declaration

    Swift

    public static func host(_ host: String, _ mapPathsClosure: (URLPathMapper<Route>) -> Void) -> URLMatcherGroup<Route>
  • Match some scheme.

    Declaration

    Swift

    public static func scheme(_ scheme: String, _ mapPathsClosure: (URLPathMapper<Route>) -> Void) -> URLMatcherGroup<Route>
  • Set a group of mapped paths for multiple hosts

    Declaration

    Swift

    public static func group(hosts: StringMatcher = .any,
                             schemes: StringMatcher = .any,
                             _ mapPathsClosure: (URLPathMapper<Route>) -> Void) -> URLMatcherGroup<Route>