Cargo Features
tower-http has no features set by default.
[dependencies]
tower-http = { version = "0.6.2", features = ["full", "add-extension", "auth", "catch-panic", "cors", "follow-redirect", "fs", "limit", "map-request-body", "map-response-body", "metrics", "normalize-path", "propagate-header", "redirect", "request-id", "sensitive-headers", "set-header", "set-status", "timeout", "trace", "util", "validate-request", "compression-br", "compression-deflate", "compression-full", "compression-gzip", "compression-zstd", "decompression-br", "decompression-deflate", "decompression-full", "decompression-gzip", "decompression-zstd"] }
- full = add-extension, auth, catch-panic, compression-full, cors, decompression-full, follow-redirect, fs, limit, map-request-body, map-response-body, metrics, normalize-path, propagate-header, redirect, request-id, sensitive-headers, set-header, set-status, timeout, trace, util, validate-request
- add-extension full?
-
Affects
builder::ServiceBuilderExt.add_extension
,tower-http::add_extension
… - auth full? = base64, validate-request
-
Affects
tower-http::auth
… - catch-panic full? = tracing
-
Enables http-body and http-body-util, std of futures-util
Affects
builder::ServiceBuilderExt.catch_panic
,tower-http::catch_panic
… - cors full?
-
Affects
tower-http::cors
… - follow-redirect full? = futures-util, iri-string
-
Enables http-body, util of tower
Affects
builder::ServiceBuilderExt.follow_redirects
,tower-http::follow_redirect
… - fs full? = futures-util, httpdate, mime, mime_guess, percent-encoding, set-status, tracing
-
Enables tokio-util, http-body, http-body-util, and http-range-header, alloc of futures-util, fs and io-util of tokio
Affects
services::fs
… - limit full?
-
Enables http-body and http-body-util
Affects
builder::ServiceBuilderExt.request_body_limit
,tower-http::limit
… - map-request-body full?
-
Affects
builder::ServiceBuilderExt.map_request_body
,tower-http::map_request_body
… - map-response-body full?
-
Affects
builder::ServiceBuilderExt.map_response_body
,tower-http::map_response_body
… - metrics full?
-
Enables http-body, time of tokio
Affects
tower-http::metrics
… - normalize-path full?
-
Affects
builder::ServiceBuilderExt.trim_trailing_slash
,tower-http::normalize_path
… - propagate-header full?
-
Affects
builder::ServiceBuilderExt.propagate_header
,tower-http::propagate_header
… - redirect full?
-
Affects
services::redirect
… - request-id full? = uuid
-
Affects
builder::ServiceBuilderExt.set_request_id
,builder::ServiceBuilderExt.set_x_request_id
,builder::ServiceBuilderExt.propagate_request_id
,builder::ServiceBuilderExt.propagate_x_request_id
,tower-http::request_id
… - sensitive-headers full?
-
Affects
builder::ServiceBuilderExt.sensitive_headers
,builder::ServiceBuilderExt.sensitive_request_headers
,builder::ServiceBuilderExt.sensitive_response_headers
,tower-http::sensitive_headers
… - set-header full?
-
Affects
builder::ServiceBuilderExt.override_request_header
,builder::ServiceBuilderExt.append_request_header
,builder::ServiceBuilderExt.insert_request_header_if_not_present
,builder::ServiceBuilderExt.override_response_header
,builder::ServiceBuilderExt.append_response_header
,builder::ServiceBuilderExt.insert_response_header_if_not_present
,tower-http::set_header
… - set-status fs? full?
-
Affects
tower-http::set_status
… - timeout full?
-
Enables http-body, time of tokio
Affects
tower-http::timeout
… - trace full? = tracing
-
Enables http-body
Affects
builder::ServiceBuilderExt.trace_for_http
,builder::ServiceBuilderExt.trace_for_grpc
,tower-http::trace
… - util full? = tower
-
Affects
builder::ServiceBuilderExt
… - validate-request auth? full? = mime
-
Affects
tower-http::validate_request
… - compression-br compression-full? = futures-core, tokio, tokio-util
-
Enables http-body and brotli of async-compression
optional dependencies
- compression-deflate compression-full? = futures-core, tokio, tokio-util
-
Enables http-body, zlib of async-compression
- compression-full full? = compression-br, compression-deflate, compression-gzip, compression-zstd
- compression-gzip compression-full? = futures-core, tokio, tokio-util
-
Enables http-body, gzip of async-compression
- compression-zstd compression-full? = futures-core, tokio, tokio-util
-
Enables http-body, zstd of async-compression
- decompression-br decompression-full? = futures-core, tokio, tokio-util
-
Enables http-body and http-body-util, brotli of async-compression
- decompression-deflate decompression-full? = futures-core, tokio, tokio-util
-
Enables http-body and http-body-util, zlib of async-compression
- decompression-full full? = decompression-br, decompression-deflate, decompression-gzip, decompression-zstd
- decompression-gzip decompression-full? = futures-core, tokio, tokio-util
-
Enables http-body and http-body-util, gzip of async-compression
- decompression-zstd decompression-full? = futures-core, tokio, tokio-util
-
Enables http-body and http-body-util, zstd of async-compression
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.
- async-compression compression-br? compression-deflate? compression-gzip? compression-zstd? decompression-br? decompression-deflate? decompression-gzip? decompression-zstd?
- base64 auth?
- futures-core compression-br? compression-deflate? compression-gzip? compression-zstd? decompression-br? decompression-deflate? decompression-gzip? decompression-zstd?
- futures-util catch-panic? follow-redirect? fs?
- iri-string follow-redirect?
- mime fs? validate-request?
- mime_guess fs?
- percent-encoding fs?
- tokio compression-br? compression-deflate? compression-gzip? compression-zstd? decompression-br? decompression-deflate? decompression-gzip? decompression-zstd? fs? metrics? timeout?
- tokio-util compression-br? compression-deflate? compression-gzip? compression-zstd? decompression-br? decompression-deflate? decompression-gzip? decompression-zstd? fs?
- tower follow-redirect? util?
- tracing catch-panic? fs? trace?
- httpdate fs?
- uuid request-id?