pub struct MqttEventLoop {
pub options: MqttOptions,
pub state: MqttState,
pub requests: Box<dyn Requests>,
/* private fields */
}
Expand description
Complete state of the eventloop
Fields§
§options: MqttOptions
Options of the current mqtt connection
state: MqttState
Current state of the connection
requests: Box<dyn Requests>
Request stream
Implementations§
Source§impl MqttEventLoop
impl MqttEventLoop
Sourcepub async fn connect<'eventloop>(
&'eventloop mut self,
) -> Result<impl Stream<Item = Notification> + 'eventloop, EventLoopError>
pub async fn connect<'eventloop>( &'eventloop mut self, ) -> Result<impl Stream<Item = Notification> + 'eventloop, EventLoopError>
Connects to the broker and returns a stream that does everything MQTT. This stream internally processes requests from the request stream provided to the eventloop while also consuming byte stream from the network and yielding mqtt packets as the output of the stream
Auto Trait Implementations§
impl Freeze for MqttEventLoop
impl !RefUnwindSafe for MqttEventLoop
impl Send for MqttEventLoop
impl Sync for MqttEventLoop
impl Unpin for MqttEventLoop
impl !UnwindSafe for MqttEventLoop
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