Skip to main content

Module stack

Module stack 

Source
Available on crate feature tower only.
Expand description

Helpers for building transport stacks with ServiceBuilder.

Structs§

ConcurrencyLimitLayer
Enforces a limit on the concurrent number of requests the underlying service can handle.
RateLimitLayer
Enforces a rate limit on the number of requests the underlying service can handle over a period of time.
ServiceBuilder
Declaratively construct Service values.
TimeoutLayer
Applies a timeout to requests via the supplied inner service.

Traits§

IntoBoxHttpService
Extension trait to box a configured service stack.
IntoBoxStreamingHttpService
Extension trait to box a configured streaming service stack.

Functions§

build
Builds a type-erased transport stack from a reqwest client and a configuration closure.
build_dual
Builds buffered and streaming transport stacks from one configuration closure.
reqwest_service
Creates a reqwest-backed inner service for layer stacking.
with_buffer
Wraps the reqwest inner service with tower::buffer::Buffer.
with_concurrency_limit
Convenience: concurrency limit on the transport stack.
with_request_logging
Logs each transport call at DEBUG (wire-level; complements LoggerPlugin).