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
keep_alive: u16
client_id: MString<'message>
Connack
Publish
Fields
dup: bool
qos: MQualityOfService
retain: bool
topic_name: MString<'message>
id: Option<MPacketIdentifier>
payload: &'message [u8]
Puback
Fields
Pubrec
Fields
Pubrel
Fields
Pubcomp
Fields
Subscribe
Suback
Unsubscribe
Unsuback
Fields
Pingreq
Pingresp
Disconnect
Implementations
Trait Implementations
impl<'message> Copy for MPacket<'message>
impl<'message> Eq for MPacket<'message>
impl<'message> StructuralEq for MPacket<'message>
impl<'message> StructuralPartialEq for MPacket<'message>
Auto Trait Implementations
impl<'message> RefUnwindSafe for MPacket<'message>
impl<'message> Send for MPacket<'message>
impl<'message> Sync for MPacket<'message>
impl<'message> Unpin for MPacket<'message>
impl<'message> UnwindSafe for MPacket<'message>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
sourcefn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
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
sourceimpl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
sourcefn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
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