pub struct MetricsLayer<H> { /* private fields */ }Expand description
Tower layer that invokes HttpMetricsHook for request lifecycle metrics.
Route labels come from Self::route when set, then from Axum
axum::extract::MatchedPath, and finally "<unknown>".
Implementations§
Source§impl<H> MetricsLayer<H>where
H: HttpMetricsHook,
impl<H> MetricsLayer<H>where
H: HttpMetricsHook,
Trait Implementations§
Source§impl<H: Clone> Clone for MetricsLayer<H>
impl<H: Clone> Clone for MetricsLayer<H>
Source§fn clone(&self) -> MetricsLayer<H>
fn clone(&self) -> MetricsLayer<H>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<H: Debug> Debug for MetricsLayer<H>
impl<H: Debug> Debug for MetricsLayer<H>
Source§impl<S, H> Layer<S> for MetricsLayer<H>where
H: HttpMetricsHook,
impl<S, H> Layer<S> for MetricsLayer<H>where
H: HttpMetricsHook,
Auto Trait Implementations§
impl<H> Freeze for MetricsLayer<H>where
H: Freeze,
impl<H> RefUnwindSafe for MetricsLayer<H>where
H: RefUnwindSafe,
impl<H> Send for MetricsLayer<H>where
H: Send,
impl<H> Sync for MetricsLayer<H>where
H: Sync,
impl<H> Unpin for MetricsLayer<H>where
H: Unpin,
impl<H> UnsafeUnpin for MetricsLayer<H>where
H: UnsafeUnpin,
impl<H> UnwindSafe for MetricsLayer<H>where
H: 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