Module tower_web::middleware[][src]

Middleware traits and implementations.

A middleware decorates an service and provides additional functionality. This additional functionality may include, but is not limited to:

A middleware implements the Middleware trait.

Currently, the following middleware implementations are provided:

More will come.

Note: This module will eventually be extracted out of tower-web into tower and tower-http.

Modules

cors

CORS middleware.

deflate

Middleware that deflates HTTP response bodies

log

Middleware that creates a log entry for each HTTP request.

Structs

Chain

Two middlewares chained together.

Identity

A no-op middleware.

Traits

Middleware

Decorates a Service, transforming either the request or the response.