[][src]Trait metered::metric::OnResult

pub trait OnResult<R>: Enter {
    fn on_result(&self, _enter: Self::E, _result: &R) -> Advice { ... }
}

The OnResult trait is implemented on Aspects to get notified when an expression has returned.

Provided methods

fn on_result(&self, _enter: Self::E, _result: &R) -> Advice

Called when an expression has returned.

This function is passed both the enter return value, and the expression return value.

on_result does not get a chance to alter the returned result. Use OnResultMut for that purpose.

Loading content...

Implementors

impl<C: Counter, R> OnResult<R> for HitCount<C>[src]

fn on_result(&self, _enter: Self::E, _result: &R) -> Advice[src]

impl<C: Counter, T, E> OnResult<Result<T, E>> for ErrorCount<C>[src]

impl<G: Gauge, R> OnResult<R> for InFlight<G>[src]

impl<H: Histogram, T: Instant, R> OnResult<R> for ResponseTime<H, T>[src]

impl<P: RecordThroughput + Serialize, T: Instant, R> OnResult<R> for Throughput<T, P>[src]

Loading content...