Skip to main content

Module router

Module router 

Source
Expand description

The runtime Router that matches incoming requests to handlers.

Routes are dispatched via a per-method radix trie (matchit). Patterns that conflict with already-registered routes fall back to a linear scan within their method bucket, so registration never fails silently. The match_fn produced by typeway_path! runs on the candidate route as a type-validation step (e.g. confirming {} parses as u32).

Structs§

Router
A runtime HTTP router.
RouterService
A tower::Service wrapper around a shared Router.

Constants§

DEFAULT_MAX_BODY_SIZE
Default maximum request body size: 2 MiB.