Expand description
Various utility types and functions that are generally used with Tower.
Modules§
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.