Skip to content

Instance Method

route(path:parameters:)

Fetches output for a specific route.
func route(path: [String], parameters: inout Parameters) -> Self.Output?

Parameters

path

Raw path segments.

parameters

Will collect dynamic parameter values.

Return Value

Output of matching route, if found.

Discussion

PathComponent.parameter(_:) values will be stored in the supplied Parameters container during routing.

If no matching route is found, nil is returned.