Trait failsafe::Instrument

source ·
pub trait Instrument {
    // Required methods
    fn on_call_rejected(&self);
    fn on_open(&self);
    fn on_half_open(&self);
    fn on_closed(&self);
}
Expand description

Consumes the state machine events. May used for metrics and/or logs.

Required Methods§

source

fn on_call_rejected(&self)

Calls when state machine reject a call.

source

fn on_open(&self)

Calls when the circuit breaker become to open state.

source

fn on_half_open(&self)

Calls when the circuit breaker become to half open state.

source

fn on_closed(&self)

Calls when the circuit breaker become to closed state.

Implementations on Foreign Types§

source§

impl Instrument for ()

An instrumentation which does noting.

Implementors§