[][src]Struct paho_mqtt::token::DeliveryToken

pub struct DeliveryToken { /* fields omitted */ }

A DeliveryToken is a mechanism for tracking the progress of an asynchronous message publish operation.

Methods

impl DeliveryToken[src]

pub fn new(msg: Message) -> DeliveryToken[src]

Creates a new, un-signaled delivery Token. This is a token which tracks delivery of a message.

pub fn from_error(msg: Message, rc: i32) -> DeliveryToken[src]

Creates a new Token signaled with a return code.

pub fn message(&self) -> &Message[src]

Gets the message associated with the publish token.

pub fn wait_for(self, dur: Duration) -> MqttResult<()>[src]

Blocks the caller a limited amount of time waiting for the asynchronous operation to complete.

Trait Implementations

impl Clone for DeliveryToken[src]

impl Future for DeliveryToken[src]

type Item = ()

The type of value that this future will resolved with if it is successful. Read more

type Error = MqttError

The type of error that this future will resolve with if it fails in a normal fashion. Read more

fn poll(&mut self) -> Result<Async<Self::Item>, Self::Error>[src]

Poll the token to see if the request has completed yet.

impl Into<Message> for DeliveryToken[src]

impl Into<Token> for DeliveryToken[src]

fn into(self) -> Token[src]

Converts the delivery token into a Token

impl Send for DeliveryToken[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<F> FutureExt for F where
    F: Future
[src]

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

impl<F> IntoFuture for F where
    F: Future
[src]

type Future = F

The future that this type can be converted into.

type Item = <F as Future>::Item

The item that the future may resolve with.

type Error = <F as Future>::Error

The error that the future may resolve with.

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.