pub struct MeteredWrapper<C> { /* private fields */ }Expand description
A wrapper that adds metrics to any channel.
Implementations§
Source§impl<C> MeteredWrapper<C>
impl<C> MeteredWrapper<C>
Sourcepub fn into_inner(self) -> C
pub fn into_inner(self) -> C
Consume the wrapper and return the inner channel.
Trait Implementations§
Source§impl<C> MeteredChannel for MeteredWrapper<C>
impl<C> MeteredChannel for MeteredWrapper<C>
Source§fn metrics(&self) -> &ChannelMetrics
fn metrics(&self) -> &ChannelMetrics
Get the metrics for this channel.
Auto Trait Implementations§
impl<C> !Freeze for MeteredWrapper<C>
impl<C> !RefUnwindSafe for MeteredWrapper<C>
impl<C> Send for MeteredWrapper<C>where
C: Send,
impl<C> Sync for MeteredWrapper<C>where
C: Sync,
impl<C> Unpin for MeteredWrapper<C>where
C: Unpin,
impl<C> UnwindSafe for MeteredWrapper<C>where
C: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoMetered for T
impl<T> IntoMetered for T
Source§fn metered(self, metrics: Arc<ChannelMetrics>) -> MeteredSender<Self>
fn metered(self, metrics: Arc<ChannelMetrics>) -> MeteredSender<Self>
Wrap this sender with metrics tracking.
Source§impl<T> WithMetrics for T
impl<T> WithMetrics for T
Source§fn with_metrics(self) -> MeteredWrapper<Self>
fn with_metrics(self) -> MeteredWrapper<Self>
Wrap this channel with metrics tracking.