Skip to main content

Module bus

Module bus 

Source
Expand description

EventBus: serial event dispatcher feeding Lua handlers registered via bus.on(kind, fn) / bus.on_any(fn).

This subtask (Subtask 1) defines the pure-Rust core: Event, Source, EventBus, plus a Handler trait placeholder that Subtask 3 will swap for an mlua::RegistryKey-backed implementation.

Module wiring (mod bus; in main.rs) and tokio-util Cargo dependency are deferred to Subtask 2.

Re-exports§

pub use dispatcher::HandlerKey;
pub use dispatcher::EventBus;
pub use dispatcher::Handler;
pub use event::AckReceiver;
pub use event::AckSender;
pub use event::AckResult;
pub use event::Event;
pub use source::Source;

Modules§

dispatcher
EventBus dispatcher.
event
Event type flowing through the EventBus.
source
Source trait: something that produces Events.