Module util

Source
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.
AndThenLayer
A Layer that produces a AndThen service.
MapErr
Service returned by the map_err combinator.
MapErrLayer
A Layer that produces MapErr services.
MapRequest
Service returned by the MapRequest combinator.
MapRequestLayer
A Layer that produces MapRequest services.
MapResponse
Service returned by the map_response combinator.
MapResponseLayer
A Layer that produces a MapResponse service.
MapResult
Service returned by the map_result combinator.
MapResultLayer
A Layer that produces a MapResult service.
ServiceFn
A Service implemented by a closure.
Then
Service returned by the then combinator.
ThenLayer
A Layer that produces a Then service.

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§

option_layer
Convert an Option<Layer> into a Layer.
service_fn
Returns a new ServiceFn with the given closure.