pub struct MqttConfig {
pub host: String,
pub port: u16,
pub client_id: String,
pub username: Option<String>,
pub password: Option<String>,
pub keep_alive_secs: u64,
pub ws_port: u16,
}Expand description
Connection parameters for the MQTT broker.
Fields§
§host: StringBroker hostname or IP address.
port: u16Standard MQTT port (default 1883) or TLS port (8883).
client_id: StringClient identifier sent to the broker.
username: Option<String>Optional username for broker authentication.
password: Option<String>Optional password for broker authentication.
keep_alive_secs: u64Keep-alive interval in seconds.
ws_port: u16WebSocket port (for browser clients, default 9001).
Trait Implementations§
Source§impl Clone for MqttConfig
impl Clone for MqttConfig
Source§fn clone(&self) -> MqttConfig
fn clone(&self) -> MqttConfig
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 moreSource§impl Debug for MqttConfig
impl Debug for MqttConfig
Source§impl Default for MqttConfig
impl Default for MqttConfig
Source§impl<'de> Deserialize<'de> for MqttConfig
impl<'de> Deserialize<'de> for MqttConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MqttConfig
impl RefUnwindSafe for MqttConfig
impl Send for MqttConfig
impl Sync for MqttConfig
impl Unpin for MqttConfig
impl UnwindSafe for MqttConfig
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