pub struct WsBridge { /* private fields */ }Implementations§
Source§impl WsBridge
impl WsBridge
pub fn new( mqtt_tx: Sender<WsEnvelope>, mqtt_client: Arc<MqttClient>, mqtt_host: String, mqtt_ws_port: u16, ) -> Self
Sourcepub fn spawn_monitor_task(&self)
pub fn spawn_monitor_task(&self)
Spawn a background task that:
- Consumes raw MQTT envelopes from the broadcast channel.
- Updates
MonitorState. - Broadcasts Python-compatible JSON patches to all
/wsclients.
Auto Trait Implementations§
impl Freeze for WsBridge
impl !RefUnwindSafe for WsBridge
impl Send for WsBridge
impl Sync for WsBridge
impl Unpin for WsBridge
impl !UnwindSafe for WsBridge
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