pub struct BridgeState {
pub mqtt_tx: Sender<WsEnvelope>,
pub monitor: Arc<Mutex<MonitorState>>,
pub monitor_tx: Sender<String>,
pub mqtt_client: Arc<MqttClient>,
pub mqtt_host: String,
pub mqtt_ws_port: u16,
}Fields§
§mqtt_tx: Sender<WsEnvelope>MQTT → WS broadcast (raw envelopes, consumed by monitor task).
monitor: Arc<Mutex<MonitorState>>Aggregated monitor state shared across all /ws connections.
monitor_tx: Sender<String>Broadcast channel: serialised JSON patches to all /ws clients.
mqtt_client: Arc<MqttClient>MQTT client for publishing commands received from the browser.
mqtt_host: StringMosquitto WebSocket host (for /mqtt proxy).
mqtt_ws_port: u16Mosquitto WebSocket port (for /mqtt proxy, default 9001).
Trait Implementations§
Source§impl Clone for BridgeState
impl Clone for BridgeState
Source§fn clone(&self) -> BridgeState
fn clone(&self) -> BridgeState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BridgeState
impl !RefUnwindSafe for BridgeState
impl Send for BridgeState
impl Sync for BridgeState
impl Unpin for BridgeState
impl !UnwindSafe for BridgeState
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