Expand description
Named middleware registry. Strings like "auth", "throttle:60,1", "csrf"
are resolved at app-init time to tower Layers.
Modules§
- builtin
- Built-in middleware: installed on the registry during bootstrap.
Structs§
- Middleware
Registry - Middleware
Spec - Parsed form of
"throttle:60,1"→MiddlewareSpec { name: "throttle", args: ["60", "1"] }. - Named
Middleware - A named middleware: a function that takes a request, optionally consumes args, and returns a response.
Functions§
- inject_
container_ mw - Container injection middleware. Installs the container into the task-local context for the duration of the request so facade functions work.
- install_
defaults - invoke
- Apply a middleware by name to an axum router-style handler chain.
The error from
MiddlewareFnis converted to a 500 response if not handled. - standard_
layers - trace_
layer - Convenience for constructing a tracing layer with sensible defaults.