Module middleware

Source

Modules§

add_extension
Middleware that clones a value into each request’s extensions.
auth
Authorization related middleware.
body
Body types.
catch_panic
Convert panics into responses.
classify
Tools for classifying responses as either success or failure.
compression
Middleware that compresses response bodies.
cors
Middleware which adds headers for CORS.
decompression
Middleware that decompresses request and response bodies.
follow_redirect
Middleware for following redirections.
limit
Middleware for limiting request bodies.
map_request_body
Apply a transformation to the request body.
map_response_body
Apply a transformation to the response body.
metrics
Middlewares for adding metrics to services.
normalize_path
Middleware that normalizes paths.
propagate_header
Propagate a header from the request to the response.
request_id
Set and propagate request ids.
sensitive_headers
Middlewares that mark headers as sensitive.
services
Services that return responses without wrapping other Services.
set_header
Middleware for setting headers on requests and responses.
set_status
Middleware to override status codes.
timeout
Middleware that applies a timeout to requests.
trace
Middleware that adds high level tracing to a Service.
validate_request
Middleware that validates requests.

Enums§

CompressionLevel
Level of compression data should be compressed with.
LatencyUnit
The latency unit used to report latencies by middleware.

Traits§

ServiceBuilderExt
Extension trait that adds methods to tower::ServiceBuilder for adding middleware from tower-http.
ServiceExt
Extension trait that adds methods to any Service for adding middleware from tower-http.

Type Aliases§

BoxError
Alias for a type-erased error type.