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§
Sourcefn on_superstep_start(&self, _step: u64, _frontier: &[NodeId])
fn on_superstep_start(&self, _step: u64, _frontier: &[NodeId])
A superstep is about to execute the given frontier.
Sourcefn on_node_start(&self, _node_id: NodeId, _name: &str)
fn on_node_start(&self, _node_id: NodeId, _name: &str)
A node began executing.
Sourcefn on_node_complete(&self, _node_id: NodeId, _name: &str, _duration: Duration)
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).
Sourcefn on_node_error(&self, _node_id: NodeId, _name: &str, _err: &BspError)
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.
Sourcefn on_node_retry(
&self,
_node_id: NodeId,
_attempt: u32,
_wait: Duration,
_err: &BspError,
)
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.
Sourcefn on_edge_taken(
&self,
_source: NodeId,
_target: NodeId,
_condition_label: &str,
)
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.
Sourcefn on_loop_iteration(&self, _edge: EdgeId, _iteration: u64, _max: Option<u64>)
fn on_loop_iteration(&self, _edge: EdgeId, _iteration: u64, _max: Option<u64>)
A budgeted edge fired against its iteration cap — badge the loop counter.
Sourcefn on_suspended(&self, _suspensions: &[PendingSuspension])
fn on_suspended(&self, _suspensions: &[PendingSuspension])
One or more nodes requested suspension; the run is pausing.
Sourcefn on_complete(&self, _steps: u64)
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§
impl BspInterceptor for ChannelInterceptor
tokio only.