pub struct InstrumentedMiddleware<M> { /* private fields */ }
Expand description
A middleware wrapper that tracks execution statistics
Implementations§
Source§impl<M> InstrumentedMiddleware<M>
impl<M> InstrumentedMiddleware<M>
pub fn new(middleware: M, name: String) -> Self
Sourcepub fn stats(&self) -> MiddlewareStats
pub fn stats(&self) -> MiddlewareStats
Get the current statistics for this middleware
Sourcepub fn reset_stats(&self)
pub fn reset_stats(&self)
Reset statistics for this middleware
Trait Implementations§
Source§impl<M: Debug> Debug for InstrumentedMiddleware<M>
impl<M: Debug> Debug for InstrumentedMiddleware<M>
Source§impl<M: Middleware> Middleware for InstrumentedMiddleware<M>
impl<M: Middleware> Middleware for InstrumentedMiddleware<M>
Source§fn handle(&self, request: ElifRequest, next: Next) -> NextFuture<'static>
fn handle(&self, request: ElifRequest, next: Next) -> NextFuture<'static>
Handle the request and call the next middleware in the chain
Auto Trait Implementations§
impl<M> Freeze for InstrumentedMiddleware<M>where
M: Freeze,
impl<M> RefUnwindSafe for InstrumentedMiddleware<M>where
M: RefUnwindSafe,
impl<M> Send for InstrumentedMiddleware<M>where
M: Send,
impl<M> Sync for InstrumentedMiddleware<M>where
M: Sync,
impl<M> Unpin for InstrumentedMiddleware<M>where
M: Unpin,
impl<M> UnwindSafe for InstrumentedMiddleware<M>where
M: UnwindSafe,
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