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 PacketTypepub fn new(t: ControlType, flags: u8) -> PacketType[src]
pub fn new(t: ControlType, flags: u8) -> PacketTypeCreates a packet type
pub fn with_default(t: ControlType) -> PacketType[src]
pub fn with_default(t: ControlType) -> PacketTypeCreates 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) -> u8To 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 PacketTypefn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Eq for PacketType[src]
impl Eq for PacketTypeimpl PartialEq for PacketType[src]
impl PartialEq for PacketTypefn eq(&self, other: &PacketType) -> bool[src]
fn eq(&self, other: &PacketType) -> boolThis 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) -> boolThis method tests for !=.
impl Copy for PacketType[src]
impl Copy for PacketTypeimpl Clone for PacketType[src]
impl Clone for PacketTypefn clone(&self) -> PacketType[src]
fn clone(&self) -> PacketTypeReturns 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 PacketTypeimpl Sync for PacketType
impl Sync for PacketType