[][src]Struct sage_mqtt::UnSubAck

pub struct UnSubAck {
    pub packet_identifier: u16,
    pub reason_string: Option<String>,
    pub user_properties: Vec<(String, String)>,
    pub reason_codes: Vec<ReasonCode>,
}

An UnSubAck is sent by the server to acknowledge an unsubscribe request.

Fields

packet_identifier: u16

The packet identifier is used to identify the message throughout the communication

reason_string: Option<String>

An optional description of the acknowledgement.

user_properties: Vec<(String, String)>

General purpose user-defined properties

reason_codes: Vec<ReasonCode>

A list of reason codes ackowledging the unsubscribtion. Each ReasonCode at a given index correspond to a unsubscribe request from the Unsubscribe packet at the same index.

Implementations

impl UnSubAck[src]

pub async fn write<'_, W: AsyncWrite + Unpin>(
    self,
    writer: &'_ mut W
) -> SageResult<usize>
[src]

Write the UnSubAck body of a packet, returning the written size in bytes in case of success.

pub async fn read<'_, R: AsyncRead + Unpin>(
    reader: &'_ mut R,
    remaining_size: usize
) -> SageResult<Self>
[src]

Read the UnSubAck body from reader, retuning it in case of success.

Trait Implementations

impl Clone for UnSubAck[src]

impl Debug for UnSubAck[src]

impl Default for UnSubAck[src]

impl PartialEq<UnSubAck> for UnSubAck[src]

impl StructuralPartialEq for UnSubAck[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.