Skip to main content

StepObserver

Trait StepObserver 

Source
pub trait StepObserver {
    // Required method
    fn observe(
        &mut self,
        obs: Observation<'_>,
    ) -> impl Future<Output = ()> + Send;
}
Expand description

A hook on every message an Engine pumps.

async because one implementor (the subagent’s progress relay) sends on a bounded channel and must not drop events under backpressure. Implementors that do no I/O just write a body that never awaits.

Required Methods§

Source

fn observe(&mut self, obs: Observation<'_>) -> impl Future<Output = ()> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl StepObserver for ()

The no-op observer, for drivers that only want the reducer pumped.

Source§

async fn observe(&mut self, _obs: Observation<'_>)

Implementors§