Skip to main content

Crate erio_event_bus

Crate erio_event_bus 

Source
Expand description

§erio-event-bus

erio-event-bus provides an async event bus with a simple event model and pluggable event sources.

Use it to coordinate components (or specialist agents) via publish/subscribe events instead of direct coupling.

§Quickstart

use erio_event_bus::{Event, EventBus};

let bus = EventBus::new();
let mut _rx = bus.subscribe();

let event = Event::new("demo-source", "tick", serde_json::json!({"ok": true}));
let _ = bus.publish(event);

§API tour

  • Core types: Event, EventBus
  • Source contract: EventSource
  • Error type: EventBusError
  • Modules: event, bus, source, error

§Compatibility

  • MSRV: Rust 1.93
  • License: Apache-2.0 Erio Event Bus

Re-exports§

pub use bus::EventBus;
pub use error::EventBusError;
pub use event::Event;
pub use source::EventSource;

Modules§

bus
Event bus that aggregates sources and distributes events to subscribers.
error
Error types for the event bus.
event
Core event type for the event bus.
source
Pluggable event source trait.