Struct tokio_timeit_middleware::Timeit [] [src]

pub struct Timeit<S, TimeSink> { /* fields omitted */ }

A middleware that times how long it takes the downstream service S to respond to a request with a response. The recorded time::Durations are passed to the TimeSink.

Methods

impl<S, TimeSink> Timeit<S, TimeSink>
[src]

Wrap the given service for timing.

Trait Implementations

impl<S, TimeSink, TimeSinkFn> Service for Timeit<S, TimeSink> where
    S: Service,
    TimeSink: Deref<Target = TimeSinkFn> + Clone,
    TimeSinkFn: Fn(Duration), 
[src]

Requests handled by the service.

Responses given by the service.

Errors produced by the service.

The future response value.

Process the request and return the response asynchronously.