Create a new SessionManager with a Bus for event publishing
(bus: Arc<Bus>)
| 766 | |
| 767 | /// Create a new SessionManager with a Bus for event publishing |
| 768 | pub fn with_bus(bus: Arc<Bus>) -> Self { |
| 769 | Self { |
| 770 | sessions: HashMap::new(), |
| 771 | events: Vec::new(), |
| 772 | bus: Some(bus), |
| 773 | } |
| 774 | } |
| 775 | |
| 776 | /// Publish an event to the Bus (fire-and-forget from sync context) |
| 777 | fn publish_event(&self, def: &'static BusEventDef, properties: serde_json::Value) { |