pub struct Connection {
pub eventloop: EventLoop,
/* private fields */
}
Expand description
MQTT connection. Maintains all the necessary state
Fields§
§eventloop: EventLoop
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn iter(&mut self) -> Iter<'_> ⓘ
pub fn iter(&mut self) -> Iter<'_> ⓘ
Returns an iterator over this connection. Iterating over this is all that’s necessary to make connection progress and maintain a robust connection. Just continuing to loop will reconnect NOTE Don’t block this while iterating
Sourcepub fn recv_timeout(
&mut self,
duration: Duration,
) -> Result<Result<Event, ConnectionError>, RecvTimeoutError>
pub fn recv_timeout( &mut self, duration: Duration, ) -> Result<Result<Event, ConnectionError>, RecvTimeoutError>
Auto Trait Implementations§
impl !Freeze for Connection
impl !RefUnwindSafe for Connection
impl Send for Connection
impl !Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
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