pub struct AxumLayer { /* private fields */ }Expand description
Tower layer that reports per-request response times to the hotpath server worker, bucketed by the axum route template that handled the request.
The axum! macro appends it automatically; apps that build their own
middleware stack can add it with Router::layer(hotpath::AxumLayer::new()).
Router::layer only wraps routes added before it, so attach it after the
last .route(..) / .fallback(..) call.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AxumLayer
impl RefUnwindSafe for AxumLayer
impl Send for AxumLayer
impl Sync for AxumLayer
impl Unpin for AxumLayer
impl UnsafeUnpin for AxumLayer
impl UnwindSafe for AxumLayer
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