Available on crate feature
util
only.Expand description
Various utility types and functions that are generally used with Tower.
Modules§
- backoff
- This module contains generic backoff utilities to be used with the retry and limit layers.
- rng
- PRNG utilities for tower middleware.
Structs§
- AndThen
- Service returned by the
and_then
combinator. - AndThen
Layer - A
Layer
that produces aAndThen
service. - MapErr
- Service returned by the
map_err
combinator. - MapErr
Layer - A
Layer
that producesMapErr
services. - 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. - Service
Fn - A
Service
implemented by a closure. - Then
Service
returned by thethen
combinator.- Then
Layer - A
Layer
that produces aThen
service.
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§
- option_
layer - Convert an
Option<Layer>
into aLayer
. - service_
fn - Returns a new
ServiceFn
with the given closure.