pub struct QoSHandler { /* private fields */ }Expand description
QoS handler for managing message delivery guarantees
Implementations§
Source§impl QoSHandler
impl QoSHandler
pub fn new() -> Self
Sourcepub async fn handle_qo_s0(
&self,
_message: MessageState,
) -> Result<(), Box<dyn Error>>
pub async fn handle_qo_s0( &self, _message: MessageState, ) -> Result<(), Box<dyn Error>>
Handle QoS 0: At most once delivery
Sourcepub async fn handle_qo_s1(
&self,
message: MessageState,
client_id: &str,
) -> Result<(), Box<dyn Error>>
pub async fn handle_qo_s1( &self, message: MessageState, client_id: &str, ) -> Result<(), Box<dyn Error>>
Handle QoS 1: At least once delivery
Sourcepub async fn handle_qo_s2(
&self,
message: MessageState,
client_id: &str,
) -> Result<(), Box<dyn Error>>
pub async fn handle_qo_s2( &self, message: MessageState, client_id: &str, ) -> Result<(), Box<dyn Error>>
Handle QoS 2: Exactly once delivery
Sourcepub async fn handle_puback(&self, packet_id: u16) -> Result<(), Box<dyn Error>>
pub async fn handle_puback(&self, packet_id: u16) -> Result<(), Box<dyn Error>>
Handle PUBACK (QoS 1 acknowledgment)
Sourcepub async fn handle_pubrec(
&self,
packet_id: u16,
client_id: &str,
) -> Result<(), Box<dyn Error>>
pub async fn handle_pubrec( &self, packet_id: u16, client_id: &str, ) -> Result<(), Box<dyn Error>>
Handle PUBREC (QoS 2 first acknowledgment)
Sourcepub async fn handle_pubrel(
&self,
packet_id: u16,
client_id: &str,
) -> Result<(), Box<dyn Error>>
pub async fn handle_pubrel( &self, packet_id: u16, client_id: &str, ) -> Result<(), Box<dyn Error>>
Handle PUBREL (QoS 2 release)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QoSHandler
impl !RefUnwindSafe for QoSHandler
impl Send for QoSHandler
impl Sync for QoSHandler
impl Unpin for QoSHandler
impl !UnwindSafe for QoSHandler
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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