Skip to main content

EventQueueReader

Trait EventQueueReader 

Source
pub trait EventQueueReader: Send + 'static {
    // Required method
    fn read(
        &mut self,
    ) -> Pin<Box<dyn Future<Output = Option<A2aResult<StreamResponse>>> + Send + '_>>;
}
Expand description

Trait for reading streaming events.

NOT object-safe (used as a concrete type internally). The async fn is fine because this trait is never used behind dyn.

Required Methods§

Source

fn read( &mut self, ) -> Pin<Box<dyn Future<Output = Option<A2aResult<StreamResponse>>> + Send + '_>>

Reads the next event, returning None when the stream is closed.

Implementors§