1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! # Subscriber.
//!
//! Subscribers observe runtime events without blocking the supervisor.
//!
//! [`Subscribe`] is the trait for custom event handlers.
//! Each subscriber gets its own bounded queue and one worker task.
//! A slow subscriber can overflow its own queue, but it does not block other subscribers or task execution.
//!
//! Delivery is best-effort: events may be dropped if the bus or a subscriber queue falls behind.
//! Drops and subscriber panics are reported as diagnostic events when possible.
//!
//! See [`Subscribe`] for the public contract.
//!
//! ## Flow
//!
//! ```text
//! Bus (broadcast) ──► internal subscriber listener
//! ├─► AliveTracker::update()
//! └─► SubscriberSet::emit_arc()
//! ├─► [queue S1] ──► worker ──► S1.on_event()
//! ├─► [queue S2] ──► worker ──► S2.on_event()
//! └─► ...
//! ```
//!
//! See [`Event`](crate::Event) and [`EventKind`](crate::EventKind) for event data.
pub use Subscribe;
pub use SubscriberSet;
pub use LogWriter;
pub use TracingBridge;