Skip to main content

origin_events/
lib.rs

1//! Typed event bus (ADR-0005).
2//!
3//! Events are Rust types. Subscribing is `bus.subscribe::<PlatformEvent>()`, not
4//! `bus.on("platform:sync:completed")`. A renamed field is a compile error.
5//!
6//! Use an event when several independent components *may* react. If the caller needs
7//! a result, call the service directly instead.
8
9mod bus;
10mod platform;
11
12pub use bus::{Event, EventBus, EventStream, PublishError, RecvError, TryRecvError};
13pub use platform::{
14    AccountExpired, AlertRaised, AlertResolved, JobFinished, JobProgress, JobStarted,
15    PlatformEvent, SyncCompleted, SyncFailed, TrayItemSelected,
16};