Struct MqttContext
pub(crate) struct MqttContext {
pub(crate) manager: SubscriberManager,
pub(crate) error: Option<Error>,
}Expand description
A struct that holds the context for an MQTT connection, including a subscriber manager and any connection errors that have occurred.
Fields§
§manager: SubscriberManager§error: Option<Error>Implementations§
§impl MqttContext
impl MqttContext
pub(crate) const fn new( manager: SubscriberManager, error: Option<Error>, ) -> Self
pub(crate) async fn check_connection(&mut self) -> Result<()>
pub(crate) async fn check_connection(&mut self) -> Result<()>
Checks the connection status and returns an error if there is one.
This function checks the connection status of the MQTT client and
returns an error if there is one. If there is no error, it returns
Ok(()).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MqttContext
impl !RefUnwindSafe for MqttContext
impl Send for MqttContext
impl Sync for MqttContext
impl Unpin for MqttContext
impl !UnwindSafe for MqttContext
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