Struct tokio_middleware::Timeout [] [src]

pub struct Timeout<S> { /* fields omitted */ }

Abort requests that are taking too long

Methods

impl<S> Timeout<S>
[src]

[src]

Crate a new Timeout with the given upstream service.

Requests will be limited to duration and aborted once the limit has been reached.

Trait Implementations

impl<S: Clone> Clone for Timeout<S>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<S, E> Service for Timeout<S> where
    S: Service<Error = E>,
    E: From<TimeoutError<S::Future>>, 
[src]

Requests handled by the service.

Responses given by the service.

Errors produced by the service.

The future response value.

[src]

Process the request and return the response asynchronously.