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§

CompiledRouteCache
Cache of pre-compiled route template patterns.
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_route_cached
Match a route template against a request path using a compiled cache.
match_route_cached_with_segments
Match a route template against pre-split request path segments.
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.