pub trait PubReceiver {
// Required methods
fn recv<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Publish>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn recv_manual_ack<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<(Publish, Option<AckToken>)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn close(&mut self);
}
Expand description
Receiver for incoming MQTT messages.
Required Methods§
Sourcefn recv<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Publish>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn recv<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Publish>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receives the next incoming publish.
Return None if there will be no more incoming publishes.
Sourcefn recv_manual_ack<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<(Publish, Option<AckToken>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn recv_manual_ack<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<(Publish, Option<AckToken>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receives the next incoming publish, and a token that can be used to manually acknowledge
the publish (Quality of Service 1 or 2), or None
(Quality of Service 0).
Return None if there will be no more incoming publishes.