Enum Response
#[non_exhaustive]pub enum Response {
Puback(Ack<'static>),
Pubrec(Ack<'static>),
Pubrel(Ack<'static>),
Pubcomp(Ack<'static>),
Pingreq,
Disconnect(ReasonCode),
}Expand description
A response packet that the caller must encode and send to the server.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Puback(Ack<'static>)
Send a PUBACK (QoS 1 receive acknowledgement).
Pubrec(Ack<'static>)
Send a PUBREC (QoS 2 receive, step 1).
Pubrel(Ack<'static>)
Send a PUBREL (QoS 2 release, step 2).
Pubcomp(Ack<'static>)
Send a PUBCOMP (QoS 2 complete, step 3).
Pingreq
Send a PINGREQ.
Disconnect(ReasonCode)
Send a DISCONNECT with the given reason code and close.
Implementations§
Trait Implementations§
impl Copy for Response
impl Eq for Response
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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