Trait InstrumentedFutureContext

Source
pub trait InstrumentedFutureContext<T> {
    // Required method
    fn on_result(self, result: &T);
}
Expand description

Trait for handling the completion of instrumented futures.

This trait provides a callback mechanism to perform actions when an instrumented future completes with a result. It’s typically used for recording metrics, logging outcomes, or other side effects based on the future’s result.

Required Methods§

Source

fn on_result(self, result: &T)

Called when the instrumented future completes with a result.

§Arguments
  • result: Reference to the result produced by the future

Implementors§