pub struct MockEventLoop { /* private fields */ }
Expand description
Mock implementation of an MQTT event loop
Implementations§
Source§impl MockEventLoop
impl MockEventLoop
Sourcepub fn new() -> (Self, EventInjector)
pub fn new() -> (Self, EventInjector)
Return a new mocked MQTT event loop along with an event injector.
Trait Implementations§
Source§impl MqttEventLoop for MockEventLoop
impl MqttEventLoop for MockEventLoop
Source§fn poll<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Event, ConnectionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn poll<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Event, ConnectionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Poll the event loop for the next
Event
Source§fn set_clean_start(&mut self, _clean_start: bool)
fn set_clean_start(&mut self, _clean_start: bool)
Modify the clean start flag for subsequent MQTT connection attempts
Source§fn set_authentication_method(&mut self, authentication_method: Option<String>)
fn set_authentication_method(&mut self, authentication_method: Option<String>)
Set the authentication method
Source§fn set_authentication_data(&mut self, authentication_data: Option<Bytes>)
fn set_authentication_data(&mut self, authentication_data: Option<Bytes>)
Set the authentication data
Auto Trait Implementations§
impl Freeze for MockEventLoop
impl RefUnwindSafe for MockEventLoop
impl Send for MockEventLoop
impl Sync for MockEventLoop
impl Unpin for MockEventLoop
impl UnwindSafe for MockEventLoop
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