Trait EventBroadcaster

Source
pub trait EventBroadcaster: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn broadcast<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: &'life1 AgentEvent,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn should_broadcast(&self, _event: &AgentEvent) -> bool { ... }
    fn supports_streaming(&self) -> bool { ... }
}

Required Methods§

Source

fn id(&self) -> &str

Source

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

Provided Methods§

Source

fn should_broadcast(&self, _event: &AgentEvent) -> bool

Source

fn supports_streaming(&self) -> bool

Indicates whether this broadcaster supports streaming token events. Default is false for backward compatibility.

Implementors§