Struct tokio_retry::middleware::Middleware
[−]
[src]
pub struct Middleware<T, S> { /* fields omitted */ }
Middleware that adds retries to a service via a retry strategy.
Methods
impl<T: StrategyFactory, S> Middleware<T, S>
[src]
fn new(handle: Handle, strategy: T, inner: S) -> Middleware<T, S>
Trait Implementations
impl<T: StrategyFactory, S: Service> Service for Middleware<T, S> where
S::Request: Clone,
[src]
S::Request: Clone,
type Request = S::Request
Requests handled by the service.
type Response = S::Response
Responses given by the service.
type Error = Error<S::Error>
Errors produced by the service.
type Future = Retry<T::Iter, ServiceRequest<S>>
The future response value.
fn call(&self, request: Self::Request) -> Self::Future
Process the request and return the response asynchronously.