pub trait OutputSink: Send + Sync {
// Required method
fn emit<'life0, 'async_trait>(
&'life0 self,
event: OutputEvent,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Sink used inside a worker function to emit events. The InProcSpawner
injects one into WorkerInvocation. The ProcessSpawner / child-process
pull path folds stdout / IPC into OutputEvent internally and calls
engine.submit_output directly, so it does not go through OutputSink
(it lands in the same engine state, but not via this trait).
Required Methods§
Sourcefn emit<'life0, 'async_trait>(
&'life0 self,
event: OutputEvent,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn emit<'life0, 'async_trait>(
&'life0 self,
event: OutputEvent,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Emits one OutputEvent (progress, final, etc.) into the engine’s
output stream for this attempt.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".