StreamItem

Trait StreamItem 

Source
pub trait StreamItem: Send + Sync {
    // Required method
    fn next<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<String>, AgentError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait representing a single item yielded by a real‑time stream.

Required Methods§

Source

fn next<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, AgentError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieve the next chunk of data. Returns None when the stream ends.

Implementors§