pub struct Mqtt { /* private fields */ }
Implementations§
Source§impl Mqtt
impl Mqtt
pub fn new(opts: MqttOptions, buffer_size: usize) -> Result<Self>
pub fn new_from_env(id: &str) -> Result<Self>
pub async fn publish_json( &self, topic: &Topic, payload: impl Serialize, ) -> Result<()>
pub async fn publish( &self, topic: &Topic, payload: impl Into<Vec<u8>>, ) -> Result<()>
pub async fn finish(self) -> Result<()>
Auto Trait Implementations§
impl Freeze for Mqtt
impl RefUnwindSafe for Mqtt
impl Send for Mqtt
impl Sync for Mqtt
impl Unpin for Mqtt
impl UnwindSafe for Mqtt
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