Struct PollContext
pub(crate) struct PollContext {
pub(crate) client: AsyncClient,
pub(crate) event_loop: EventLoop,
pub(crate) close_rx: Receiver<()>,
pub(crate) mqtt_ctx: Arc<Mutex<MqttContext>>,
pub(crate) min_reconnect_delay: Duration,
pub(crate) max_reconnect_delay: Duration,
pub(crate) reconnect_delay: Duration,
}Expand description
It is a struct that holds the necessary components for polling the MQTT broker.
Fields§
§client: AsyncClient§event_loop: EventLoop§close_rx: Receiver<()>§mqtt_ctx: Arc<Mutex<MqttContext>>§min_reconnect_delay: Duration§max_reconnect_delay: Duration§reconnect_delay: DurationCurrent delay between reconnection attempts.
Duration::ZERO means that the client is currently connected.
Implementations§
§impl PollContext
impl PollContext
Auto Trait Implementations§
impl !Freeze for PollContext
impl !RefUnwindSafe for PollContext
impl Send for PollContext
impl !Sync for PollContext
impl Unpin for PollContext
impl !UnwindSafe for PollContext
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