Skip to main content

Module route_matcher

Module route_matcher 

Source
Expand description

Iterative path template matcher for server-side route resolution.

Matches request paths against route path templates without regex. Supports :param, :param? (optional), and *splat segments.

Structs§

RouteMatch
Result of matching a request path against a route path template.

Functions§

compute_route_base
Compute the new route base from a matched route’s consumed request segments.
is_relative_path
Check whether a route path is relative (does NOT start with /).
match_single_route
Match a single route template against a request path.
resolve_route_path
Resolve a route path against a base path.
split_request_path
Split a request path into segments, filtering empty parts.