Struct mqtt::control::packet_type::PacketType [−][src]
pub struct PacketType { pub control_type: ControlType, pub flags: u8, }
Packet type
Fields
control_type: ControlType
flags: u8
Methods
impl PacketType
[src]
impl PacketType
pub fn new(t: ControlType, flags: u8) -> PacketType
[src]
pub fn new(t: ControlType, flags: u8) -> PacketType
Creates a packet type
pub fn with_default(t: ControlType) -> PacketType
[src]
pub fn with_default(t: ControlType) -> PacketType
Creates a packet type with default flags
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#Table_2.2-
pub fn to_u8(&self) -> u8
[src]
pub fn to_u8(&self) -> u8
To code
pub fn from_u8(val: u8) -> Result<PacketType, PacketTypeError>
[src]
pub fn from_u8(val: u8) -> Result<PacketType, PacketTypeError>
From code
Trait Implementations
impl Debug for PacketType
[src]
impl Debug for PacketType
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for PacketType
[src]
impl Eq for PacketType
impl PartialEq for PacketType
[src]
impl PartialEq for PacketType
fn eq(&self, other: &PacketType) -> bool
[src]
fn eq(&self, other: &PacketType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &PacketType) -> bool
[src]
fn ne(&self, other: &PacketType) -> bool
This method tests for !=
.
impl Copy for PacketType
[src]
impl Copy for PacketType
impl Clone for PacketType
[src]
impl Clone for PacketType
fn clone(&self) -> PacketType
[src]
fn clone(&self) -> PacketType
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for PacketType
impl Send for PacketType
impl Sync for PacketType
impl Sync for PacketType