Available on crate feature
util
only.Expand description
Various utility types and functions that are generally used with Tower.
Modules§
Structs§
- AndThen
- Service returned by the
and_then
combinator. - AndThen
Layer - A
Layer
that produces aAndThen
service. - BoxClone
Service - A
Clone
+Send
boxedService
. - BoxClone
Service Layer - A
Clone
+Send
boxedLayer
. - BoxClone
Sync Service - A
Clone
+Send
+Sync
boxedService
. - BoxClone
Sync Service Layer - A
Clone
+Send
+Sync
boxedLayer
. - BoxLayer
- A boxed
Layer
trait object. - BoxService
- A boxed
Service + Send
trait object. - CallAll
- This is a
Stream
of responses resulting from calling the wrappedService
for 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
Service
for aFuture
that produces aService
. - MapErr
- Service returned by the
map_err
combinator. - MapErr
Layer - A
Layer
that producesMapErr
services. - MapFuture
Service
returned by themap_future
combinator.- MapFuture
Layer - A
Layer
that produces aMapFuture
service. - MapRequest
- Service returned by the
MapRequest
combinator. - MapRequest
Layer - A
Layer
that producesMapRequest
services. - MapResponse
- Service returned by the
map_response
combinator. - MapResponse
Layer - A
Layer
that produces aMapResponse
service. - MapResult
- Service returned by the
map_result
combinator. - MapResult
Layer - A
Layer
that produces aMapResult
service. - Oneshot
- A
Future
consuming aService
and request, waiting until theService
is ready, and then callingService::call
with 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
Future
that yields the service when it is ready to accept a request. - Service
Fn - A
Service
implemented by a closure. - Then
Service
returned by thethen
combinator.- Then
Layer - A
Layer
that produces aThen
service. - Unsync
BoxService - A boxed
Service
trait object.
Enums§
- Either
- Combine two different service types into a single type.
Traits§
- Service
Ext - An extension trait for
Service
s that provides a variety of convenient adapters
Functions§
- future_
service - Returns a new
FutureService
for the given future. - option_
layer - Convert an
Option<Layer>
into aLayer
. - service_
fn - Returns a new
ServiceFn
with the given closure.