Module tower::util

source · []
Available on crate feature util only.
Expand description

Various utility types and functions that are generally used with Tower.

Modules

Error types

Future types

Structs

Service returned by the and_then combinator.

A Layer that produces a AndThen service.

A boxed Layer trait object.

A boxed Service + Send trait object.

This is a Stream of responses resulting from calling the wrapped Service for each request received on the wrapped Stream.

A stream of responses received from the inner service in received order.

A type that implements Service for a Future that produces a Service.

Service returned by the map_err combinator.

A Layer that produces MapErr services.

Service returned by the map_future combinator.

A Layer that produces a MapFuture service.

Service returned by the MapRequest combinator.

A Layer that produces MapRequest services.

Service returned by the map_response combinator.

A Layer that produces a MapResponse service.

Service returned by the map_result combinator.

A Layer that produces a MapResult service.

A Future consuming a Service and request, waiting until the Service is ready, and then calling Service::call with the request, and waiting for that Future.

Optionally forwards requests to an inner service.

A future that yields a mutable reference to the service when it is ready to accept a request.

A Future that yields the service when it is ready to accept a request.

A Service implemented by a closure.

Service returned by the then combinator.

A Layer that produces a Then service.

A boxed Service trait object.

Enums

Combine two different service types into a single type.

Traits

An extension trait for Services that provides a variety of convenient adapters

Functions

Returns a new FutureService for the given future.

Convert an Option<Layer> into a Layer.

Returns a new ServiceFn with the given closure.

Type Definitions

ReadyAndDeprecated

A future that yields a mutable reference to the service when it is ready to accept a request.