Skip to main content

BspInterceptor

Trait BspInterceptor 

Source
pub trait BspInterceptor: Send + Sync {
    // Provided methods
    fn on_superstep_start(&self, _step: u64, _frontier: &[NodeId]) { ... }
    fn on_node_start(&self, _node_id: NodeId, _name: &str) { ... }
    fn on_node_complete(
        &self,
        _node_id: NodeId,
        _name: &str,
        _duration: Duration,
    ) { ... }
    fn on_node_error(&self, _node_id: NodeId, _name: &str, _err: &BspError) { ... }
    fn on_node_retry(
        &self,
        _node_id: NodeId,
        _attempt: u32,
        _wait: Duration,
        _err: &BspError,
    ) { ... }
    fn on_edge_taken(
        &self,
        _source: NodeId,
        _target: NodeId,
        _condition_label: &str,
    ) { ... }
    fn on_loop_iteration(
        &self,
        _edge: EdgeId,
        _iteration: u64,
        _max: Option<u64>,
    ) { ... }
    fn on_suspended(&self, _suspensions: &[PendingSuspension]) { ... }
    fn on_complete(&self, _steps: u64) { ... }
}
Expand description

Telemetry observer to audit performance and trace the state transitions of a run.

All methods are no-ops by default — implement only the events you need.

Provided Methods§

Source

fn on_superstep_start(&self, _step: u64, _frontier: &[NodeId])

A superstep is about to execute the given frontier.

Source

fn on_node_start(&self, _node_id: NodeId, _name: &str)

A node began executing.

Source

fn on_node_complete(&self, _node_id: NodeId, _name: &str, _duration: Duration)

A node finished executing (including skip-bypassed executions, which report a zero duration).

Source

fn on_node_error(&self, _node_id: NodeId, _name: &str, _err: &BspError)

A node’s failure is propagating (after any retries were exhausted or classified fatal). Also fires when the failure is routed to an error edge.

Source

fn on_node_retry( &self, _node_id: NodeId, _attempt: u32, _wait: Duration, _err: &BspError, )

A node failure was classified transient; the engine will re-execute after wait. attempt is the 1-based retry number.

Source

fn on_edge_taken( &self, _source: NodeId, _target: NodeId, _condition_label: &str, )

An edge fired: its condition matched and a token was emitted toward target. This is what makes a GUI alive — highlight the active edge.

Source

fn on_loop_iteration(&self, _edge: EdgeId, _iteration: u64, _max: Option<u64>)

A budgeted edge fired against its iteration cap — badge the loop counter.

Source

fn on_suspended(&self, _suspensions: &[PendingSuspension])

One or more nodes requested suspension; the run is pausing.

Source

fn on_complete(&self, _steps: u64)

The run completed naturally after steps supersteps.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl BspInterceptor for ChannelInterceptor

Available on crate feature tokio only.