pub struct EventLoop { /* private fields */ }Expand description
An srad_client::EventLoop implementation using rumqttc
Implementations§
Source§impl EventLoop
impl EventLoop
Sourcepub fn new(options: MqttOptions, cap: usize) -> (Self, Client)
pub fn new(options: MqttOptions, cap: usize) -> (Self, Client)
Create a new Eventloop.
options are the mqtt options to create the rumqtt client with. Some options will be overwritten to ensure Sparkplug compliance.
cap specifies the capacity of the bounded async channel for the client handle.
Trait Implementations§
Source§impl EventLoop for EventLoop
impl EventLoop for EventLoop
Source§fn poll<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Event> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn poll<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Event> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Poll the EventLoop for an event
Continuing to poll will reconnect if there is
a disconnection.
NOTE Don’t block this while iterating
Source§fn set_last_will(&mut self, will: LastWill)
fn set_last_will(&mut self, will: LastWill)
Set the last will to be used on the next connection
Auto Trait Implementations§
impl !Freeze for EventLoop
impl !RefUnwindSafe for EventLoop
impl Send for EventLoop
impl !Sync for EventLoop
impl Unpin for EventLoop
impl !UnwindSafe for EventLoop
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