blob: 1750dc58d6005c43a97a779be58da6b6e0c615be [file] [log] [blame]
<!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="API documentation for the Rust `ConnectOptionsBuilder` struct in crate `paho_mqtt`.">
<meta name="keywords" content="rust, rustlang, rust-lang, ConnectOptionsBuilder">
<title>paho_mqtt::connect_options::ConnectOptionsBuilder - Rust</title>
<link rel="stylesheet" type="text/css" href="../../normalize.css">
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../main.css">
</head>
<body class="rustdoc struct">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<p class='location'>Struct ConnectOptionsBuilder</p><div class="block items"><ul><li><a href="#methods">Methods</a></li></ul></div><p class='location'><a href='../index.html'>paho_mqtt</a>::<wbr><a href='index.html'>connect_options</a></p><script>window.sidebarCurrent = {name: 'ConnectOptionsBuilder', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content">
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>paho_mqtt</a>::<wbr><a href='index.html'>connect_options</a>::<wbr><a class="struct" href=''>ConnectOptionsBuilder</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a class='srclink' href='../../src/paho_mqtt/connect_options.rs.html#155-162' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct ConnectOptionsBuilder { /* fields omitted */ }</pre><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/paho_mqtt/connect_options.rs.html#164-346' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.new' class="method"><span id='new.v' class='invisible'><code>fn <a href='#method.new' class='fnname'>new</a>() -&gt; <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span></h4>
<h4 id='method.keep_alive_interval' class="method"><span id='keep_alive_interval.v' class='invisible'><code>fn <a href='#method.keep_alive_interval' class='fnname'>keep_alive_interval</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;keep_alive_interval: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html" title="struct std::time::duration::Duration">Duration</a><br>) -&gt; &amp;mut <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span></h4>
<div class='docblock'><p>Sets the keep alive interval for the client session.</p>
<h1 id='arguments' class='section-header'><a href='#arguments'>Arguments</a></h1>
<p><code>keep_alive_interval</code> The maximum time that should pass without
communication between the client and server.
This has a resolution in seconds.</p>
</div><h4 id='method.clean_session' class="method"><span id='clean_session.v' class='invisible'><code>fn <a href='#method.clean_session' class='fnname'>clean_session</a>(&amp;mut self, clean: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; &amp;mut <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span></h4>
<div class='docblock'><p>Sets the &#39;clean session&#39; flag to send to the broker.</p>
<h1 id='arguments-1' class='section-header'><a href='#arguments-1'>Arguments</a></h1>
<p><code>clean</code> Whether the broker should remove any previously-stored
information for this client.</p>
</div><h4 id='method.max_inflight' class="method"><span id='max_inflight.v' class='invisible'><code>fn <a href='#method.max_inflight' class='fnname'>max_inflight</a>(&amp;mut self, max_inflight: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; &amp;mut <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span></h4>
<div class='docblock'><p>Sets the maximum number of in-flight messages that can be
simultaneously handled by this client.</p>
<h1 id='arguments-2' class='section-header'><a href='#arguments-2'>Arguments</a></h1>
<p><code>max_inflight</code> The maximum number of messages that can be in-flight
at any given time with this client. </p>
</div><h4 id='method.will_options' class="method"><span id='will_options.v' class='invisible'><code>fn <a href='#method.will_options' class='fnname'>will_options</a>(&amp;mut self, will: <a class="struct" href="../../paho_mqtt/will_options/struct.WillOptions.html" title="struct paho_mqtt::will_options::WillOptions">WillOptions</a>) -&gt; &amp;mut <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span></h4>
<div class='docblock'><p>Sets the LWT options for the connection.</p>
<h1 id='arguments-3' class='section-header'><a href='#arguments-3'>Arguments</a></h1>
<p><code>will</code> The LWT options for the connection.</p>
</div><h4 id='method.ssl_options' class="method"><span id='ssl_options.v' class='invisible'><code>fn <a href='#method.ssl_options' class='fnname'>ssl_options</a>(&amp;mut self, ssl: <a class="struct" href="../../paho_mqtt/ssl_options/struct.SslOptions.html" title="struct paho_mqtt::ssl_options::SslOptions">SslOptions</a>) -&gt; &amp;mut <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span></h4>
<div class='docblock'><p>Sets the SSL options for the connection.</p>
<h1 id='arguments-4' class='section-header'><a href='#arguments-4'>Arguments</a></h1>
<p><code>ssl</code> The SSL options for the connection.</p>
</div><h4 id='method.user_name' class="method"><span id='user_name.v' class='invisible'><code>fn <a href='#method.user_name' class='fnname'>user_name</a>(&amp;mut self, user_name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; &amp;mut <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span></h4>
<div class='docblock'><p>Sets the user name for authentication with the broker.
This works with the password.</p>
<h1 id='arguments-5' class='section-header'><a href='#arguments-5'>Arguments</a></h1>
<p><code>user_name</code> The user name to send to the broker.</p>
</div><h4 id='method.password' class="method"><span id='password.v' class='invisible'><code>fn <a href='#method.password' class='fnname'>password</a>(&amp;mut self, password: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; &amp;mut <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span></h4>
<div class='docblock'><p>Sets the password for authentication with the broker.
This works with the user name.</p>
<h1 id='arguments-6' class='section-header'><a href='#arguments-6'>Arguments</a></h1>
<p><code>password</code> The password to send to the broker.</p>
</div><h4 id='method.connect_timeout' class="method"><span id='connect_timeout.v' class='invisible'><code>fn <a href='#method.connect_timeout' class='fnname'>connect_timeout</a>(&amp;mut self, timeout: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html" title="struct std::time::duration::Duration">Duration</a>) -&gt; &amp;mut <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span></h4>
<div class='docblock'><p>Sets the time interval to allow the connect to complete.</p>
<h1 id='arguments-7' class='section-header'><a href='#arguments-7'>Arguments</a></h1>
<p><code>timeout</code> The time interval to allow the connect to
complete. This has a resolution of seconds.</p>
</div><h4 id='method.retry_interval' class="method"><span id='retry_interval.v' class='invisible'><code>fn <a href='#method.retry_interval' class='fnname'>retry_interval</a>(&amp;mut self, interval: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html" title="struct std::time::duration::Duration">Duration</a>) -&gt; &amp;mut <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span></h4>
<div class='docblock'><p>Sets the retry interval.</p>
<h1 id='arguments-8' class='section-header'><a href='#arguments-8'>Arguments</a></h1>
<p><code>interval</code> The retry interval. This has a resolution of seconds.</p>
</div><h4 id='method.server_uris' class="method"><span id='server_uris.v' class='invisible'><code>fn <a href='#method.server_uris' class='fnname'>server_uris</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;server_uris: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;<br>) -&gt; &amp;mut <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span></h4>
<div class='docblock'><p>Specify the servers to which the client will connect.</p>
<h1 id='arguments-9' class='section-header'><a href='#arguments-9'>Arguments</a></h1>
<p><code>server_uris</code> The addresses of the brokers to which this client
should connect.</p>
</div><h4 id='method.mqtt_version' class="method"><span id='mqtt_version.v' class='invisible'><code>fn <a href='#method.mqtt_version' class='fnname'>mqtt_version</a>(&amp;mut self, ver: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; &amp;mut <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span></h4>
<div class='docblock'><p>Sets the version of MQTT to use on the connect.</p>
<h1 id='arguments-10' class='section-header'><a href='#arguments-10'>Arguments</a></h1>
<p><code>ver</code> The version of MQTT to use when connecting to the broker.
* (0) try the latest version (3.1.1) and work backwards
* (3) only try v3.1
* (4) only try v3.1.1</p>
</div><h4 id='method.automatic_reconnect' class="method"><span id='automatic_reconnect.v' class='invisible'><code>fn <a href='#method.automatic_reconnect' class='fnname'>automatic_reconnect</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;min_retry_interval: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html" title="struct std::time::duration::Duration">Duration</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;max_retry_interval: <a class="struct" href="https://doc.rust-lang.org/nightly/std/time/duration/struct.Duration.html" title="struct std::time::duration::Duration">Duration</a><br>) -&gt; &amp;mut <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptionsBuilder.html" title="struct paho_mqtt::connect_options::ConnectOptionsBuilder">ConnectOptionsBuilder</a></code></span></h4>
<div class='docblock'><p>Sets the client to automatically reconnect if the connection is lost.</p>
<h1 id='arguments-11' class='section-header'><a href='#arguments-11'>Arguments</a></h1>
<p><code>min_retry_interval</code> The minimum retry interval. Doubled on each
failed retry. This has a resolution in seconds.
<code>max_retry_interval</code> The maximum retry interval. Doubling stops here
on failed retries. This has a resolution in
seconds.</p>
</div><h4 id='method.finalize' class="method"><span id='finalize.v' class='invisible'><code>fn <a href='#method.finalize' class='fnname'>finalize</a>(&amp;self) -&gt; <a class="struct" href="../../paho_mqtt/connect_options/struct.ConnectOptions.html" title="struct paho_mqtt::connect_options::ConnectOptions">ConnectOptions</a></code></span></h4>
<div class='docblock'><p>Finalize the builder to create the connect options.</p>
</div></div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>&larrb;</dt>
<dd>Move up in search results</dd>
<dt>&rarrb;</dt>
<dd>Move down in search results</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
<dt>+</dt>
<dd>Collapse/expand all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "paho_mqtt";
</script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>