pub trait OutputHandler: Send + Sync {
// Required method
fn on_output<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn on_stderr<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Handler for streaming output during execution.
Required Methods§
Provided Methods§
Sourcefn on_stderr<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_stderr<'life0, 'life1, 'async_trait>(
&'life0 self,
chunk: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when stderr output is produced.
The default implementation does nothing. Override this method to handle stderr separately from stdout.