pub struct AsyncMQTTNetwork { /* private fields */ }
Expand description
This struct represent the network that will be used to send and receive messages using the MQTT protocol.
Implementations§
Source§impl AsyncMQTTNetwork
impl AsyncMQTTNetwork
pub async fn new(options: MqttOptions, topics: Vec<i32>) -> Self
Trait Implementations§
Source§impl Network for AsyncMQTTNetwork
impl Network for AsyncMQTTNetwork
Source§fn send<'life0, 'async_trait>(
&'life0 mut self,
source: i32,
msg: String,
) -> Pin<Box<dyn Future<Output = NetworkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 mut self,
source: i32,
msg: String,
) -> Pin<Box<dyn Future<Output = NetworkResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a message to the network Read more
Source§fn receive<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = NetworkResult<NetworkUpdate>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn receive<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = NetworkResult<NetworkUpdate>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receive a message from the network Read more
Auto Trait Implementations§
impl Freeze for AsyncMQTTNetwork
impl RefUnwindSafe for AsyncMQTTNetwork
impl Send for AsyncMQTTNetwork
impl Sync for AsyncMQTTNetwork
impl Unpin for AsyncMQTTNetwork
impl UnwindSafe for AsyncMQTTNetwork
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more