[−][src]Struct rumqttc::Client
Client
can communicate with MQTT eventloop Connection
. Client is
cloneable and can be used to synchronously Publish, Subscribe as well as
receive incoming MQTT messages
Implementations
impl Client
[src]
pub fn new(options: MqttOptions, cap: usize) -> (Client, Connection)
[src]
Create a new Client
pub fn async_requests(&self) -> Sender<Request>
[src]
Returns an asynchronous Sender
to send MQTT requests to Connection
eventloop
pub fn publish<S, V>(
&mut self,
topic: S,
qos: QoS,
retain: bool,
payload: V
) -> Result<(), Error> where
S: Into<String>,
V: Into<Vec<u8>>,
[src]
&mut self,
topic: S,
qos: QoS,
retain: bool,
payload: V
) -> Result<(), Error> where
S: Into<String>,
V: Into<Vec<u8>>,
Sends a MQTT Publish to the eventloop
pub fn subscribe<S: Into<String>>(
&mut self,
topic: S,
qos: QoS
) -> Result<(), Error>
[src]
&mut self,
topic: S,
qos: QoS
) -> Result<(), Error>
Sends a MQTT Subscribe to the eventloop
pub fn cancel(&mut self) -> Result<(), Error>
[src]
Stops the eventloop right away
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,