pub struct EventBusTopic {
pub pending: Vec<EventRecord>,
pub dispatched: Vec<EventRecord>,
pub subscribers: HashMap<String, Vec<SubscriberId>>,
pub next_sub_id: SubscriberId,
pub next_event_id: u64,
pub last_event_ts: u64,
}Expand description
Publish-subscribe event bus with topic-based routing and priority support.
Fields§
§pending: Vec<EventRecord>Pending (unprocessed) events, in insertion order.
dispatched: Vec<EventRecord>All dispatched events, oldest first.
subscribers: HashMap<String, Vec<SubscriberId>>Subscribers: topic → list of subscriber ids.
next_sub_id: SubscriberIdNext subscriber id to assign.
next_event_id: u64Next event id to assign.
last_event_ts: u64Timestamp of the most recently published event (0 if none).
Auto Trait Implementations§
impl Freeze for EventBusTopic
impl RefUnwindSafe for EventBusTopic
impl Send for EventBusTopic
impl Sync for EventBusTopic
impl Unpin for EventBusTopic
impl UnsafeUnpin for EventBusTopic
impl UnwindSafe for EventBusTopic
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more