pub trait CommandOutputObserver: Send + Sync {
// Required method
fn on_output_delta<'life0, 'life1, 'async_trait>(
&'life0 self,
delta: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn on_output_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
_summary: &'life1 CommandOutputSummary,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Observer that receives streaming output deltas from a workspace command.
Backend implementations call this on each chunk of stdout/stderr they observe. Tool layers wire host event channels behind this trait, so the workspace abstraction does not depend on any tool event type.
Required Methods§
fn on_output_delta<'life0, 'life1, 'async_trait>(
&'life0 self,
delta: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
Sourcefn on_output_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
_summary: &'life1 CommandOutputSummary,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_output_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
_summary: &'life1 CommandOutputSummary,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Receive the final bounded-capture accounting for the command.
The default keeps existing remote workspace runners source-compatible. Runners that bound output should report the original byte count so callers can distinguish a complete result from a partial observation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".