Struct mqtt_async_client::client::Client [−][src]
pub struct Client { /* fields omitted */ }
Expand description
An MQTT client.
Start building an instance by calling Client::builder() to get a ClientBuilder, using the fluent builder pattern on ClientBuilder, then calling ClientBuilder::build(). For example:
let client =
Client::builder()
.set_url_string("mqtt://example.com").unwrap()
.build();
Client
is expected to be Send
(passable between threads), but not
Sync
(usable by multiple threads at the same time).
Implementations
Start a fluent builder interface to construct a Client
.
Publish some data on a topic.
Note that this method takes &self
. This means a caller can
create several publish futures to publish several payloads of
data simultaneously without waiting for responses.
Subscribe to some topics.read_subscriptions
will return
data for them.
Unsubscribe from some topics. read_subscriptions
will no
longer return data for them.
Wait for the next Publish packet for one of this Client’s subscriptions.
Gracefully close the connection to the server.