Struct Mqtt
pub struct Mqtt {
pub(crate) shared: Arc<Inner>,
pub(crate) join_handle: JoinHandle<()>,
}Fields§
§join_handle: JoinHandle<()>Implementations§
§impl Mqtt
impl Mqtt
pub(crate) fn new(client_id: String, config: Config) -> Result<Self, Error>
pub async fn start(&self)
pub async fn disconnect(&self)
pub async fn disconnect(&self)
Disconnects the client, but keeps the worker running.
Call Mqtt::start to reconnect.
pub async fn shutdown(self)
pub fn handle(&self) -> MqttHandle
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