Skip to main content

EventBus

Defined in the bus module.
Rust AI Agent SDK Event bus for publish-subscribe messaging.

Fields

Methods

new

Create a new event bus

with_history

Create with custom history size Parameters:

unsubscribe

Unsubscribe by ID Parameters:

publish

Publish an event Parameters:

history

Get event history

events_by_type

Get events by type Parameters:

events_by_source

Get events by source Parameters:

clear_history

Clear history

subscription_count

Get subscription count for an event type Parameters:

total_subscriptions

Get total subscription count

Source

View on GitHub

praisonai/src/bus/mod.rs at line 201