pub struct AgentConfig { /* private fields */ }
Expand description
Agent configuration.
§Options
uri
– MQTT broker URI (required).clean_session
– whether to start a clean session or continue the persisted session. Default:true
.keep_alive_interval
– keep alive time to ping the broker. Default: 30 sec.reconnect_interval
– reconnection attempts interval, never reconnect if absent. Default: never reconnect.outgoing_message_queue_size
– maximum messages in-flight. Default: 100.incoming_message_queue_size
– notification channel capacity. Default: 10.max_message_size
– maximum message size in bytes. Default: 256 * 1024.password
– MQTT broker password.requests_channel_size
- requests channel capacity.
Implementations§
Source§impl AgentConfig
impl AgentConfig
Sourcepub fn set_password(&mut self, value: &str) -> &mut Self
pub fn set_password(&mut self, value: &str) -> &mut Self
Sets password
field to the config.
Use if you don’t store the password in the config file but in an environment variable, somewhere else or generate an access token in runtime.
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§fn clone(&self) -> AgentConfig
fn clone(&self) -> AgentConfig
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 AgentConfig
impl Debug for AgentConfig
Source§impl<'de> Deserialize<'de> for AgentConfig
impl<'de> Deserialize<'de> for AgentConfig
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 AgentConfig
impl RefUnwindSafe for AgentConfig
impl Send for AgentConfig
impl Sync for AgentConfig
impl Unpin for AgentConfig
impl UnwindSafe for AgentConfig
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