pub enum MPacket<'message> {
Show 14 variants Connect { protocol_name: MString<'message>, protocol_level: u8, clean_session: bool, will: Option<MLastWill<'message>>, username: Option<MString<'message>>, password: Option<&'message [u8]>, keep_alive: u16, client_id: MString<'message>, }, Connack { session_present: bool, connect_return_code: MConnectReturnCode, }, Publish { dup: bool, qos: MQualityOfService, retain: bool, topic_name: MString<'message>, id: Option<MPacketIdentifier>, payload: &'message [u8], }, Puback { id: MPacketIdentifier, }, Pubrec { id: MPacketIdentifier, }, Pubrel { id: MPacketIdentifier, }, Pubcomp { id: MPacketIdentifier, }, Subscribe { id: MPacketIdentifier, subscriptions: MSubscriptionRequests<'message>, }, Suback { id: MPacketIdentifier, subscription_acks: MSubscriptionAcks<'message>, }, Unsubscribe { id: MPacketIdentifier, unsubscriptions: MUnsubscriptionRequests<'message>, }, Unsuback { id: MPacketIdentifier, }, Pingreq, Pingresp, Disconnect,
}

Variants

Connect

Fields

protocol_name: MString<'message>
protocol_level: u8
clean_session: bool
will: Option<MLastWill<'message>>
username: Option<MString<'message>>
password: Option<&'message [u8]>
keep_alive: u16
client_id: MString<'message>

Connack

Fields

session_present: bool
connect_return_code: MConnectReturnCode

Publish

Fields

dup: bool
retain: bool
topic_name: MString<'message>
payload: &'message [u8]

Puback

Pubrec

Pubrel

Pubcomp

Subscribe

Fields

subscriptions: MSubscriptionRequests<'message>

Suback

Fields

subscription_acks: MSubscriptionAcks<'message>

Unsubscribe

Fields

unsubscriptions: MUnsubscriptionRequests<'message>

Unsuback

Pingreq

Pingresp

Disconnect

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Given the context attached to a nom error, and given the original input to the nom parser, extract more the useful context information. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Given the original input, as well as the context reported by nom, recreate a context in the original string where the error occurred. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.