Expand description
Various utility types and functions that are generally used with Tower.
Modulesยง
- and_
then ๐ - boxed ๐
- boxed_
clone ๐ - boxed_
clone_ ๐sync - call_
all ๐ Stream<Item = Request>+Service<Request>=>Stream<Item = Response>.- either ๐
- Contains
Eitherand related types and functions. - error
- Error types
- future
- Future types
- future_
service ๐ - map_err ๐
- map_
future ๐ - map_
request ๐ - map_
response ๐ - map_
result ๐ - oneshot ๐
- optional ๐
- Contains
Optionaland related types and functions. - ready ๐
- rng
- PRNG utilities for tower middleware.
- service_
fn ๐ - then ๐
Structsยง
- AndThen
- Service returned by the
and_thencombinator. - AndThen
Layer - A
Layerthat produces aAndThenservice. - BoxClone
Service - A
Clone+SendboxedService. - BoxClone
Service Layer - A
Clone+SendboxedLayer. - BoxClone
Sync Service - A
Clone+Send+SyncboxedService. - BoxClone
Sync Service Layer - A
Clone+Send+SyncboxedLayer. - BoxLayer
- A boxed
Layertrait object. - BoxService
- A boxed
Service + Sendtrait object. - CallAll
- This is a
Streamof responses resulting from calling the wrappedServicefor each request received on the wrappedStream. - Call
AllUnordered - A stream of responses received from the inner service in received order.
- Future
Service - A type that implements
Servicefor aFuturethat produces aService. - MapErr
- Service returned by the
map_errcombinator. - MapErr
Layer - A
Layerthat producesMapErrservices. - MapFuture
Servicereturned by themap_futurecombinator.- MapFuture
Layer - A
Layerthat produces aMapFutureservice. - MapRequest
- Service returned by the
MapRequestcombinator. - MapRequest
Layer - A
Layerthat producesMapRequestservices. - MapResponse
- Service returned by the
map_responsecombinator. - MapResponse
Layer - A
Layerthat produces aMapResponseservice. - MapResult
- Service returned by the
map_resultcombinator. - MapResult
Layer - A
Layerthat produces aMapResultservice. - Oneshot
- A
Futureconsuming aServiceand request, waiting until theServiceis ready, and then callingService::callwith the request, and waiting for thatFuture. - Optional
- Optionally forwards requests to an inner service.
- Ready
- A future that yields a mutable reference to the service when it is ready to accept a request.
- Ready
Oneshot - A
Futurethat yields the service when it is ready to accept a request. - Service
Fn - A
Serviceimplemented by a closure. - Then
Servicereturned by thethencombinator.- Then
Layer - A
Layerthat produces aThenservice. - Unsync
BoxService - A boxed
Servicetrait object.
Enumsยง
- Either
- Combine two different service types into a single type.
Traitsยง
- Service
Ext - An extension trait for
Services that provides a variety of convenient adapters
Functionsยง
- future_
service - Returns a new
FutureServicefor the given future. - option_
layer - Convert an
Option<Layer>into aLayer. - service_
fn - Returns a new
ServiceFnwith the given closure.