Struct paho_mqtt::async_client::Token
[−]
[src]
pub struct Token { /* fields omitted */ }
A Token
is a mechanism for tracking the progress of an asynchronous
operation.
Methods
impl Token
[src]
fn new() -> Token
Creates a new, unsignaled Token.
fn from_message(msg: Message) -> Token
Creates a new, unsignalled delivery Token. This ia a token which tracks delivery of a message.
fn from_client<FS, FF>(
cli: *const AsyncClient,
success_cb: FS,
failure_cb: FF
) -> Token where
FS: FnMut(&AsyncClient, u16) + 'static,
FF: FnMut(&AsyncClient, u16, i32) + 'static,
cli: *const AsyncClient,
success_cb: FS,
failure_cb: FF
) -> Token where
FS: FnMut(&AsyncClient, u16) + 'static,
FF: FnMut(&AsyncClient, u16, i32) + 'static,
Creates a new, unsignalled Token with callbacks.
fn from_error(rc: i32) -> Token
Creates a new Token signalled with an error.
fn wait(&self) -> MqttResult<()>
Blocks the caller until the asynchronous operation has completed.
fn wait_for(&self, dur: Duration) -> MqttResult<()>
Blocks the caller a limited amount of time waiting for the asynchronous operation to complete.