Expand description
Various utility types and functions that are generally used with Tower.
Modules§
Structs§
- AndThen
- Service returned by the and_thencombinator.
- AndThenLayer 
- A Layerthat produces aAndThenservice.
- BoxCloneService 
- A Clone+SendboxedService.
- BoxCloneService Layer 
- A Clone+SendboxedLayer.
- BoxCloneSync Service 
- A Clone+Send+SyncboxedService.
- BoxCloneSync 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.
- CallAllUnordered 
- A stream of responses received from the inner service in received order.
- FutureService 
- A type that implements Servicefor aFuturethat produces aService.
- MapErr
- Service returned by the map_errcombinator.
- MapErrLayer 
- A Layerthat producesMapErrservices.
- MapFuture
- Servicereturned by the- map_futurecombinator.
- MapFutureLayer 
- A Layerthat produces aMapFutureservice.
- MapRequest
- Service returned by the MapRequestcombinator.
- MapRequestLayer 
- A Layerthat producesMapRequestservices.
- MapResponse
- Service returned by the map_responsecombinator.
- MapResponseLayer 
- A Layerthat produces aMapResponseservice.
- MapResult
- Service returned by the map_resultcombinator.
- MapResultLayer 
- 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.
- ReadyOneshot 
- A Futurethat yields the service when it is ready to accept a request.
- ServiceFn 
- A Serviceimplemented by a closure.
- Then
- Servicereturned by the- thencombinator.
- ThenLayer 
- A Layerthat produces aThenservice.
- UnsyncBoxService 
- A boxed Servicetrait object.
Enums§
- Either
- Combine two different service types into a single type.
Traits§
- ServiceExt 
- 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.