pub enum PacketType {
Show 15 variants
Connect = 1,
ConnAck = 2,
Publish = 3,
PubAck = 4,
PubRec = 5,
PubRel = 6,
PubComp = 7,
Subscribe = 8,
SubAck = 9,
Unsubscribe = 10,
UnsubAck = 11,
PingReq = 12,
PingResp = 13,
Disconnect = 14,
Auth = 15,
}Variants§
Connect = 1
ConnAck = 2
Publish = 3
PubAck = 4
PubRec = 5
PubRel = 6
PubComp = 7
Subscribe = 8
SubAck = 9
Unsubscribe = 10
UnsubAck = 11
PingReq = 12
PingResp = 13
Disconnect = 14
Auth = 15
Implementations§
Trait Implementations§
Source§impl BeBytes for PacketType
impl BeBytes for PacketType
Source§fn to_be_bytes_buf(&self) -> Bytes
fn to_be_bytes_buf(&self) -> Bytes
Convert to big-endian bytes as a Bytes buffer
Source§fn to_le_bytes_buf(&self) -> Bytes
fn to_le_bytes_buf(&self) -> Bytes
Convert to little-endian bytes as a Bytes buffer
Source§fn encode_be_to<B: BufMut>(&self, buf: &mut B) -> Result<(), BeBytesError>
fn encode_be_to<B: BufMut>(&self, buf: &mut B) -> Result<(), BeBytesError>
Encode directly to a buffer in big-endian format
Source§fn encode_le_to<B: BufMut>(&self, buf: &mut B) -> Result<(), BeBytesError>
fn encode_le_to<B: BufMut>(&self, buf: &mut B) -> Result<(), BeBytesError>
Encode directly to a buffer in little-endian format
fn field_size() -> usize
Source§fn try_from_be_bytes(bytes: &[u8]) -> Result<(Self, usize), BeBytesError>
fn try_from_be_bytes(bytes: &[u8]) -> Result<(Self, usize), BeBytesError>
Try to parse a struct from big-endian bytes Read more
fn to_be_bytes(&self) -> Vec<u8> ⓘ
Source§fn try_from_le_bytes(bytes: &[u8]) -> Result<(Self, usize), BeBytesError>
fn try_from_le_bytes(bytes: &[u8]) -> Result<(Self, usize), BeBytesError>
Try to parse a struct from little-endian bytes Read more
fn to_le_bytes(&self) -> Vec<u8> ⓘ
Source§impl Clone for PacketType
impl Clone for PacketType
Source§fn clone(&self) -> PacketType
fn clone(&self) -> PacketType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PacketType
impl Debug for PacketType
Source§impl From<PacketType> for u8
impl From<PacketType> for u8
Source§fn from(packet_type: PacketType) -> Self
fn from(packet_type: PacketType) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PacketType
impl PartialEq for PacketType
Source§impl TryFrom<u8> for PacketType
impl TryFrom<u8> for PacketType
impl Copy for PacketType
impl Eq for PacketType
impl StructuralPartialEq for PacketType
Auto Trait Implementations§
impl Freeze for PacketType
impl RefUnwindSafe for PacketType
impl Send for PacketType
impl Sync for PacketType
impl Unpin for PacketType
impl UnwindSafe for PacketType
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