Expand description
Experimental middleware.
Analogous to the middleware
module in Actix Web.
Structs§
- Catch
Panic - A middleware to catch panics in wrapped handlers and middleware, returning empty 500 responses.
- Error
Handlers - Middleware for registering custom status code based error handlers.
- Load
Shed - A middleware that sheds load when the inner service isn’t ready.
- MapRes
Body Middleware - Middleware transform for
map_response_body
. - MapRes
Middleware - Middleware transform for
map_response
. - Middleware
Fn - Middleware transform for
from_fn
. - Next
- Wraps the “next” service in the middleware chain.
- Normalize
Path - Middleware for normalizing a request’s path so that routes can be matched more flexibly.
- Panic
Reporter - A middleware that triggers a callback when the worker is panicking.
- Redirect
Https - A middleware to redirect traffic to HTTPS if connection is insecure.
Functions§
- from_fn
- Wraps an async function to be used as a middleware.
- map_
response - Creates a middleware from an async function that is used as a mapping function for a
ServiceResponse
. - map_
response_ body - Creates a middleware from an async function that is used as a mapping function for an
impl MessageBody
. - redirect_
to_ www - A function middleware to redirect traffic to
www.
if not already there.