Expand description
Built-in middleware. Each piece is an async function with the
signature async fn(Request, Next) -> Result<Response>. Drop any of
them into Router::middleware(...) in whatever order you want.
Structs§
- Csrf
Guard - A value a handler can pull out of the request context to embed in a rendered form. Lightweight; just wraps a string.
- Rate
Limiter
Constants§
Functions§
- csrf_
protect - gzip
- logger
- rate_
limit - The middleware function. Wrap a limiter into a closure and hand
it to
Router::middleware(...). - security_
headers