pub struct MqttClient<T> { /* private fields */ }Implementations§
Source§impl MqttClient<Client>
impl MqttClient<Client>
pub fn new( config: &MqttConfiguration<'_>, tlscerts: &'static TLSconfiguration<'_>, callback: Box<dyn Fn(MqttEvent) + Send>, ) -> Result<Self, Error>
pub fn publish(&mut self, topic: &str, qos: &QoSLevel, payload: Vec<u8>) -> u32
pub fn subscribe(&mut self, topic: &str, qos: &QoSLevel) -> Result<(), Error>
Auto Trait Implementations§
impl<T> Freeze for MqttClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for MqttClient<T>where
T: RefUnwindSafe,
impl<T> Send for MqttClient<T>where
T: Send,
impl<T> Sync for MqttClient<T>where
T: Sync,
impl<T> Unpin for MqttClient<T>where
T: Unpin,
impl<T> UnwindSafe for MqttClient<T>where
T: UnwindSafe,
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