pub struct DeviceTask { /* private fields */ }Expand description
The device driver, the rumqttc event loop and the command executor, as one future.
Implementations§
Source§impl DeviceTask
impl DeviceTask
Sourcepub fn reresolve(self, f: Reresolve) -> Self
pub fn reresolve(self, f: Reresolve) -> Self
Looks the broker up again while its address may have changed, as
ControllerTask::reresolve does.
Options f returns get the will, clean session, inflight cap and
outgoing packet limit device sets.
Sourcepub async fn run(self) -> Result<(), Error>
pub async fn run(self) -> Result<(), Error>
Runs until the device stops; see DeviceDriver::run. After
Shutdown::Announce or Shutdown::Remove, the connection waits until
every publish handed to rumqttc was written and acknowledged, at most
DeviceOptions::flush_timeout_ms, then sends DISCONNECT. After
Shutdown::Silent or DeviceHandle::abort it drops the connection
without DISCONNECT, so the broker publishes the will. The future is
Send.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DeviceTask
impl !RefUnwindSafe for DeviceTask
impl !Sync for DeviceTask
impl !UnwindSafe for DeviceTask
impl Send for DeviceTask
impl Unpin for DeviceTask
impl UnsafeUnpin for DeviceTask
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