pub struct MetricsMiddleware { /* private fields */ }Expand description
性能监控中间件
记录消息处理耗时
Implementations§
Trait Implementations§
Source§impl MessageMiddleware for MetricsMiddleware
impl MessageMiddleware for MetricsMiddleware
Source§fn before<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 MessageContext,
) -> Pin<Box<dyn Future<Output = Result<Option<Frame>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn before<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 MessageContext,
) -> Pin<Box<dyn Future<Output = Result<Option<Frame>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
处理消息(在业务处理之前) Read more
Auto Trait Implementations§
impl Freeze for MetricsMiddleware
impl RefUnwindSafe for MetricsMiddleware
impl Send for MetricsMiddleware
impl Sync for MetricsMiddleware
impl Unpin for MetricsMiddleware
impl UnsafeUnpin for MetricsMiddleware
impl UnwindSafe for MetricsMiddleware
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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