pub struct TimingMiddleware { /* private fields */ }Expand description
Middleware that captures encodes all traces in a handler as Server-Timing headers.
Implementations§
Trait Implementations§
Source§impl Debug for TimingMiddleware
impl Debug for TimingMiddleware
Source§impl<State: Clone + Send + Sync + 'static> Middleware<State> for TimingMiddleware
impl<State: Clone + Send + Sync + 'static> Middleware<State> for TimingMiddleware
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request<State>,
next: Next<'life1, State>,
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 self,
req: Request<State>,
next: Next<'life1, State>,
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Asynchronously handle the request, and return a response.
Auto Trait Implementations§
impl Freeze for TimingMiddleware
impl RefUnwindSafe for TimingMiddleware
impl Send for TimingMiddleware
impl Sync for TimingMiddleware
impl Unpin for TimingMiddleware
impl UnwindSafe for TimingMiddleware
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more