Skip to main content

LlmStreamSink

Trait LlmStreamSink 

Source
pub trait LlmStreamSink: Send + Sync {
    // Required method
    fn emit<'life0, 'async_trait>(
        &'life0 self,
        event: LlmStreamEvent,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Async fan-out target for LlmStreamEvents. Providers receive a &dyn LlmStreamSink, call emit once per chunk, and the caller decides what happens with the events (Tauri broadcasts to the frontend; tests collect into a Vec).

Required Methods§

Source

fn emit<'life0, 'async_trait>( &'life0 self, event: LlmStreamEvent, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§