Files
pilot/pilot-v2/target/doc/rumqttc/struct.MqttOptions.html
Gilles Soulier c5381b7112 Pilot v2: Core implementation + battery telemetry
Major updates:
- Complete Rust rewrite (pilot-v2/) with working MQTT client
- Fixed MQTT event loop deadlock (background task pattern)
- Battery telemetry for Linux (auto-detected via /sys/class/power_supply)
- Home Assistant auto-discovery for all sensors and switches
- Comprehensive documentation (AVANCEMENT.md, CLAUDE.md, roadmap)
- Docker test environment with Mosquitto broker
- Helper scripts for development and testing

Features working:
 MQTT connectivity with LWT
 YAML configuration with validation
 Telemetry: CPU, memory, IP, battery (Linux)
 Commands: shutdown, reboot, sleep, screen (dry-run tested)
 HA discovery and integration
 Allowlist and cooldown protection

Ready for testing on real hardware.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-30 06:23:00 +01:00

60 lines
44 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Options to configure the behaviour of MQTT connection"><title>MqttOptions in rumqttc - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="rumqttc" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0 (ded5c06cf 2025-12-08)" data-channel="1.92.0" data-search-js="search-d69d8955.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MqttOptions</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../rumqttc/index.html">rumqttc</a><span class="version">0.24.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Mqtt<wbr>Options</a></h2><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.broker_address" title="broker_address">broker_address</a></li><li><a href="#method.clean_session" title="clean_session">clean_session</a></li><li><a href="#method.client_id" title="client_id">client_id</a></li><li><a href="#method.credentials" title="credentials">credentials</a></li><li><a href="#method.inflight" title="inflight">inflight</a></li><li><a href="#method.keep_alive" title="keep_alive">keep_alive</a></li><li><a href="#method.last_will" title="last_will">last_will</a></li><li><a href="#method.manual_acks" title="manual_acks">manual_acks</a></li><li><a href="#method.max_packet_size" title="max_packet_size">max_packet_size</a></li><li><a href="#method.new" title="new">new</a></li><li><a href="#method.pending_throttle" title="pending_throttle">pending_throttle</a></li><li><a href="#method.request_channel_capacity" title="request_channel_capacity">request_channel_capacity</a></li><li><a href="#method.set_clean_session" title="set_clean_session">set_clean_session</a></li><li><a href="#method.set_credentials" title="set_credentials">set_credentials</a></li><li><a href="#method.set_inflight" title="set_inflight">set_inflight</a></li><li><a href="#method.set_keep_alive" title="set_keep_alive">set_keep_alive</a></li><li><a href="#method.set_last_will" title="set_last_will">set_last_will</a></li><li><a href="#method.set_manual_acks" title="set_manual_acks">set_manual_acks</a></li><li><a href="#method.set_max_packet_size" title="set_max_packet_size">set_max_packet_size</a></li><li><a href="#method.set_pending_throttle" title="set_pending_throttle">set_pending_throttle</a></li><li><a href="#method.set_request_channel_capacity" title="set_request_channel_capacity">set_request_channel_capacity</a></li><li><a href="#method.set_transport" title="set_transport">set_transport</a></li><li><a href="#method.transport" title="transport">transport</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block trait-implementation"><li><a href="#impl-Clone-for-MqttOptions" title="Clone">Clone</a></li><li><a href="#impl-Debug-for-MqttOptions" title="Debug">Debug</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-MqttOptions" title="!Freeze">!Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-MqttOptions" title="!RefUnwindSafe">!RefUnwindSafe</a></li><li><a href="#impl-UnwindSafe-for-MqttOptions" title="!UnwindSafe">!UnwindSafe</a></li><li><a href="#impl-Send-for-MqttOptions" title="Send">Send</a></li><li><a href="#impl-Sync-for-MqttOptions" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-MqttOptions" title="Unpin">Unpin</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow&#60;T&#62;">Borrow&#60;T&#62;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut&#60;T&#62;">BorrowMut&#60;T&#62;</a></li><li><a href="#impl-CloneToUninit-for-T" title="CloneToUninit">CloneToUninit</a></li><li><a href="#impl-From%3CT%3E-for-T" title="From&#60;T&#62;">From&#60;T&#62;</a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into&#60;U&#62;">Into&#60;U&#62;</a></li><li><a href="#impl-ToOwned-for-T" title="ToOwned">ToOwned</a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom&#60;U&#62;">TryFrom&#60;U&#62;</a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto&#60;U&#62;">TryInto&#60;U&#62;</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate rumqttc</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">rumqttc</a></div><h1>Struct <span class="struct">Mqtt<wbr>Options</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/rumqttc/lib.rs.html#443-481">Source</a> </span></div><pre class="rust item-decl"><code>pub struct MqttOptions { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Options to configure the behaviour of MQTT connection</p>
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-MqttOptions" class="impl"><a class="src rightside" href="../src/rumqttc/lib.rs.html#483-729">Source</a><a href="#impl-MqttOptions" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.MqttOptions.html" title="struct rumqttc::MqttOptions">MqttOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#493-515">Source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>&lt;S: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.92.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;, T: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.92.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;(
id: S,
host: T,
port: <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.u16.html">u16</a>,
) -&gt; <a class="struct" href="struct.MqttOptions.html" title="struct rumqttc::MqttOptions">MqttOptions</a></h4></section></summary><div class="docblock"><p>Create an <a href="struct.MqttOptions.html" title="struct rumqttc::MqttOptions"><code>MqttOptions</code></a> object that contains default values for all settings other than</p>
<ul>
<li>id: A string to identify the device connecting to a broker</li>
<li>host: The brokers domain name or IP address</li>
<li>port: The port number on which broker must be listening for incoming connections</li>
</ul>
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>options = MqttOptions::new(<span class="string">"123"</span>, <span class="string">"localhost"</span>, <span class="number">1883</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.broker_address" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#551-553">Source</a><h4 class="code-header">pub fn <a href="#method.broker_address" class="fn">broker_address</a>(&amp;self) -&gt; (<a class="struct" href="https://doc.rust-lang.org/1.92.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.u16.html">u16</a>)</h4></section></summary><div class="docblock"><p>Broker address</p>
</div></details><section id="method.set_last_will" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#555-558">Source</a><h4 class="code-header">pub fn <a href="#method.set_last_will" class="fn">set_last_will</a>(&amp;mut self, will: <a class="struct" href="mqttbytes/v4/struct.LastWill.html" title="struct rumqttc::mqttbytes::v4::LastWill">LastWill</a>) -&gt; &amp;mut Self</h4></section><section id="method.last_will" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#560-562">Source</a><h4 class="code-header">pub fn <a href="#method.last_will" class="fn">last_will</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.92.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="mqttbytes/v4/struct.LastWill.html" title="struct rumqttc::mqttbytes::v4::LastWill">LastWill</a>&gt;</h4></section><section id="method.set_transport" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#564-567">Source</a><h4 class="code-header">pub fn <a href="#method.set_transport" class="fn">set_transport</a>(&amp;mut self, transport: <a class="enum" href="enum.Transport.html" title="enum rumqttc::Transport">Transport</a>) -&gt; &amp;mut Self</h4></section><section id="method.transport" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#569-571">Source</a><h4 class="code-header">pub fn <a href="#method.transport" class="fn">transport</a>(&amp;self) -&gt; <a class="enum" href="enum.Transport.html" title="enum rumqttc::Transport">Transport</a></h4></section><details class="toggle method-toggle" open><summary><section id="method.set_keep_alive" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#575-584">Source</a><h4 class="code-header">pub fn <a href="#method.set_keep_alive" class="fn">set_keep_alive</a>(&amp;mut self, duration: <a class="struct" href="https://doc.rust-lang.org/1.92.0/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p>Set number of seconds after which client should ping the broker
if there is no other data exchange</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.keep_alive" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#587-589">Source</a><h4 class="code-header">pub fn <a href="#method.keep_alive" class="fn">keep_alive</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.92.0/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Keep alive time</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.client_id" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#592-594">Source</a><h4 class="code-header">pub fn <a href="#method.client_id" class="fn">client_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.92.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Client identifier</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_max_packet_size" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#597-601">Source</a><h4 class="code-header">pub fn <a href="#method.set_max_packet_size" class="fn">set_max_packet_size</a>(
&amp;mut self,
incoming: <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.usize.html">usize</a>,
outgoing: <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.usize.html">usize</a>,
) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p>Set packet size limit for outgoing an incoming packets</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.max_packet_size" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#604-606">Source</a><h4 class="code-header">pub fn <a href="#method.max_packet_size" class="fn">max_packet_size</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Maximum packet size</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_clean_session" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#624-631">Source</a><h4 class="code-header">pub fn <a href="#method.set_clean_session" class="fn">set_clean_session</a>(&amp;mut self, clean_session: <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.bool.html">bool</a>) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p><code>clean_session = true</code> removes all the state from queues &amp; instructs the broker
to clean all the client state when client disconnects.</p>
<p>When set <code>false</code>, broker will hold the client state and performs pending
operations on the client when reconnection with same <code>client_id</code>
happens. Local queue state is also held to retransmit packets after reconnection.</p>
<h5 id="panic"><a class="doc-anchor" href="#panic">§</a>Panic</h5>
<p>Panics if <code>clean_session</code> is false when <code>client_id</code> is empty.</p>
<div class="example-wrap should_panic"><a href="#" class="tooltip" title="This example panics"></a><pre class="rust rust-example-rendered"><code><span class="kw">let </span><span class="kw-2">mut </span>options = MqttOptions::new(<span class="string">""</span>, <span class="string">"localhost"</span>, <span class="number">1883</span>);
options.set_clean_session(<span class="bool-val">false</span>);</code></pre></div></div></details><details class="toggle method-toggle" open><summary><section id="method.clean_session" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#634-636">Source</a><h4 class="code-header">pub fn <a href="#method.clean_session" class="fn">clean_session</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Clean session</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_credentials" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#639-646">Source</a><h4 class="code-header">pub fn <a href="#method.set_credentials" class="fn">set_credentials</a>&lt;U: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.92.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;, P: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;<a class="struct" href="https://doc.rust-lang.org/1.92.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;&gt;(
&amp;mut self,
username: U,
password: P,
) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p>Username and password</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.credentials" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#649-651">Source</a><h4 class="code-header">pub fn <a href="#method.credentials" class="fn">credentials</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.92.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;(<a class="struct" href="https://doc.rust-lang.org/1.92.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>, <a class="struct" href="https://doc.rust-lang.org/1.92.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>)&gt;</h4></section></summary><div class="docblock"><p>Security options</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_request_channel_capacity" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#654-657">Source</a><h4 class="code-header">pub fn <a href="#method.set_request_channel_capacity" class="fn">set_request_channel_capacity</a>(&amp;mut self, capacity: <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.usize.html">usize</a>) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p>Set request channel capacity</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.request_channel_capacity" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#660-662">Source</a><h4 class="code-header">pub fn <a href="#method.request_channel_capacity" class="fn">request_channel_capacity</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Request channel capacity</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_pending_throttle" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#665-668">Source</a><h4 class="code-header">pub fn <a href="#method.set_pending_throttle" class="fn">set_pending_throttle</a>(&amp;mut self, duration: <a class="struct" href="https://doc.rust-lang.org/1.92.0/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a>) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p>Enables throttling and sets outoing message rate to the specified rate</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.pending_throttle" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#671-673">Source</a><h4 class="code-header">pub fn <a href="#method.pending_throttle" class="fn">pending_throttle</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.92.0/core/time/struct.Duration.html" title="struct core::time::Duration">Duration</a></h4></section></summary><div class="docblock"><p>Outgoing message rate</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_inflight" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#676-681">Source</a><h4 class="code-header">pub fn <a href="#method.set_inflight" class="fn">set_inflight</a>(&amp;mut self, inflight: <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.u16.html">u16</a>) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p>Set number of concurrent in flight messages</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.inflight" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#684-686">Source</a><h4 class="code-header">pub fn <a href="#method.inflight" class="fn">inflight</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.u16.html">u16</a></h4></section></summary><div class="docblock"><p>Number of concurrent in flight messages</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_manual_acks" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#689-692">Source</a><h4 class="code-header">pub fn <a href="#method.set_manual_acks" class="fn">set_manual_acks</a>(&amp;mut self, manual_acks: <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.bool.html">bool</a>) -&gt; &amp;mut Self</h4></section></summary><div class="docblock"><p>set manual acknowledgements</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.manual_acks" class="method"><a class="src rightside" href="../src/rumqttc/lib.rs.html#695-697">Source</a><h4 class="code-header">pub fn <a href="#method.manual_acks" class="fn">manual_acks</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>get manual acknowledgements</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Clone-for-MqttOptions" class="impl"><a class="src rightside" href="../src/rumqttc/lib.rs.html#442">Source</a><a href="#impl-Clone-for-MqttOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.MqttOptions.html" title="struct rumqttc::MqttOptions">MqttOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl"><a class="src rightside" href="../src/rumqttc/lib.rs.html#442">Source</a><a href="#method.clone" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/clone/trait.Clone.html#tymethod.clone" class="fn">clone</a>(&amp;self) -&gt; <a class="struct" href="struct.MqttOptions.html" title="struct rumqttc::MqttOptions">MqttOptions</a></h4></section></summary><div class='docblock'>Returns a duplicate of the value. <a href="https://doc.rust-lang.org/1.92.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="src" href="https://doc.rust-lang.org/1.92.0/src/core/clone.rs.html#245-247">Source</a></span><a href="#method.clone_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/clone/trait.Clone.html#method.clone_from" class="fn">clone_from</a>(&amp;mut self, source: &amp;Self)</h4></section></summary><div class='docblock'>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.92.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-MqttOptions" class="impl"><a class="src rightside" href="../src/rumqttc/lib.rs.html#898-916">Source</a><a href="#impl-Debug-for-MqttOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.MqttOptions.html" title="struct rumqttc::MqttOptions">MqttOptions</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../src/rumqttc/lib.rs.html#899-915">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/1.92.0/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/1.92.0/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/1.92.0/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-MqttOptions" class="impl"><a href="#impl-Freeze-for-MqttOptions" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.MqttOptions.html" title="struct rumqttc::MqttOptions">MqttOptions</a></h3></section><section id="impl-RefUnwindSafe-for-MqttOptions" class="impl"><a href="#impl-RefUnwindSafe-for-MqttOptions" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.92.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.MqttOptions.html" title="struct rumqttc::MqttOptions">MqttOptions</a></h3></section><section id="impl-Send-for-MqttOptions" class="impl"><a href="#impl-Send-for-MqttOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.MqttOptions.html" title="struct rumqttc::MqttOptions">MqttOptions</a></h3></section><section id="impl-Sync-for-MqttOptions" class="impl"><a href="#impl-Sync-for-MqttOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.MqttOptions.html" title="struct rumqttc::MqttOptions">MqttOptions</a></h3></section><section id="impl-Unpin-for-MqttOptions" class="impl"><a href="#impl-Unpin-for-MqttOptions" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.MqttOptions.html" title="struct rumqttc::MqttOptions">MqttOptions</a></h3></section><section id="impl-UnwindSafe-for-MqttOptions" class="impl"><a href="#impl-UnwindSafe-for-MqttOptions" class="anchor">§</a><h3 class="code-header">impl !<a class="trait" href="https://doc.rust-lang.org/1.92.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.MqttOptions.html" title="struct rumqttc::MqttOptions">MqttOptions</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.92.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.92.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/borrow.rs.html#212">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/borrow.rs.html#214">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.reference.html">&amp;T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.92.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/borrow.rs.html#221">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/1.92.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/borrow.rs.html#222">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.reference.html">&amp;mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.92.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-CloneToUninit-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/clone.rs.html#515">Source</a><a href="#impl-CloneToUninit-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/clone/trait.CloneToUninit.html" title="trait core::clone::CloneToUninit">CloneToUninit</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.clone_to_uninit" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/clone.rs.html#517">Source</a><a href="#method.clone_to_uninit" class="anchor">§</a><h4 class="code-header">unsafe fn <a href="https://doc.rust-lang.org/1.92.0/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit" class="fn">clone_to_uninit</a>(&amp;self, dest: <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.pointer.html">*mut </a><a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.u8.html">u8</a>)</h4></section></summary><span class="item-info"><div class="stab unstable"><span class="emoji">🔬</span><span>This is a nightly-only experimental API. (<code>clone_to_uninit</code>)</span></div></span><div class='docblock'>Performs copy-assignment from <code>self</code> to <code>dest</code>. <a href="https://doc.rust-lang.org/1.92.0/core/clone/trait.CloneToUninit.html#tymethod.clone_to_uninit">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#785">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#788">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#767-769">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#777">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ToOwned-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/alloc/borrow.rs.html#85-87">Source</a><a href="#impl-ToOwned-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.92.0/alloc/borrow/trait.ToOwned.html" title="trait alloc::borrow::ToOwned">ToOwned</a> for T<div class="where">where
T: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Owned" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/alloc/borrow.rs.html#89">Source</a><a href="#associatedtype.Owned" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.92.0/alloc/borrow/trait.ToOwned.html#associatedtype.Owned" class="associatedtype">Owned</a> = T</h4></section></summary><div class='docblock'>The resulting type after obtaining ownership.</div></details><details class="toggle method-toggle" open><summary><section id="method.to_owned" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/alloc/borrow.rs.html#90">Source</a><a href="#method.to_owned" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned" class="fn">to_owned</a>(&amp;self) -&gt; T</h4></section></summary><div class='docblock'>Creates owned data from borrowed data, usually by cloning. <a href="https://doc.rust-lang.org/1.92.0/alloc/borrow/trait.ToOwned.html#tymethod.to_owned">Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.clone_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/alloc/borrow.rs.html#94">Source</a><a href="#method.clone_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/alloc/borrow/trait.ToOwned.html#method.clone_into" class="fn">clone_into</a>(&amp;self, target: <a class="primitive" href="https://doc.rust-lang.org/1.92.0/std/primitive.reference.html">&amp;mut T</a>)</h4></section></summary><div class='docblock'>Uses borrowed data to replace owned data, usually by cloning. <a href="https://doc.rust-lang.org/1.92.0/alloc/borrow/trait.ToOwned.html#method.clone_into">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#827-829">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#831">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.92.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#834">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.92.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#811-813">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<div class="where">where
U: <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#815">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.92.0/src/core/convert/mod.rs.html#818">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.92.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/1.92.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html>