Struct rumqttc_async_std::Client[][src]

pub struct Client { /* fields omitted */ }

Client to communicate with MQTT eventloop Connection.

Client is cloneable and can be used to synchronously Publish, Subscribe. Asynchronous channel handle can also be extracted if necessary

Implementations

impl Client[src]

pub fn new(options: MqttOptions, cap: usize) -> (Client, Connection)[src]

Create a new Client

pub fn publish<S, V>(
    &mut self,
    topic: S,
    qos: QoS,
    retain: bool,
    payload: V
) -> Result<(), ClientError> where
    S: Into<String>,
    V: Into<Vec<u8>>, 
[src]

Sends a MQTT Publish to the eventloop

pub fn subscribe<S: Into<String>>(
    &mut self,
    topic: S,
    qos: QoS
) -> Result<(), ClientError>
[src]

Sends a MQTT Subscribe to the eventloop

pub fn subscribe_many<T>(&mut self, topics: T) -> Result<(), ClientError> where
    T: IntoIterator<Item = SubscribeFilter>, 
[src]

Sends a MQTT Subscribe for multiple topics to the eventloop

pub fn unsubscribe<S: Into<String>>(
    &mut self,
    topic: S
) -> Result<(), ClientError>
[src]

Sends a MQTT Unsubscribe to the eventloop

pub fn disconnect(&mut self) -> Result<(), ClientError>[src]

Sends a MQTT disconnect to the eventloop

pub fn cancel(&mut self) -> Result<(), ClientError>[src]

Stops the eventloop right away

Trait Implementations

impl Clone for Client[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,