Skip to main content

Module router

Module router 

Source
Expand description

Declarative segment-based HTTP router supporting static segments, named parameters (:id, :branch), tail wildcards (*path), and accurate 405 Method Not Allowed.

Structs§

RouteDef
Declarative route entry stored inside Router.
Router
Deterministic ordered segment router (zero external dependencies).

Enums§

Method
Supported HTTP methods for Web UI and API routes.
RouteMatch
Result of matching (method, path) against a Router.

Functions§

format_allow_header
Format an RFC 9110 §10.2.1 Allow header value from router methods, automatically advertising HEAD when GET is allowed, plus OPTIONS.