Struct rumqttc_async_std::EventLoop [−][src]
Eventloop with all the state of a connection
Fields
options: MqttOptions
Options of the current mqtt connection
state: MqttState
Current state of the connection
requests_rx: Receiver<Request>
Request stream
requests_tx: Sender<Request>
Requests handle to send requests
pending: IntoIter<Request>
Pending packets from last session
Implementations
impl EventLoop
[src]
pub fn new(options: MqttOptions, cap: usize) -> EventLoop
[src]
New MQTT EventLoop
When connection encounters critical errors (like auth failure), user has a choice to
access and update options
, state
and requests
.
pub fn handle(&self) -> Sender<Request>
[src]
Returns a handle to communicate with this eventloop
#[must_use = "Eventloop should be iterated over a loop to make progress"]pub async fn poll(&mut self) -> Result<Event, ConnectionError>
[src]
Yields Next notification or outgoing request and periodically pings the broker. Continuing to poll will reconnect to the broker if there is a disconnection. NOTE Don't block this while iterating
Auto Trait Implementations
impl !RefUnwindSafe for EventLoop
[src]
impl Send for EventLoop
[src]
impl !Sync for EventLoop
[src]
impl Unpin for EventLoop
[src]
impl !UnwindSafe for EventLoop
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,