Struct mqtt::packet::connect::ConnectPacket [−][src]
pub struct ConnectPacket { /* fields omitted */ }
CONNECT
packet
Methods
impl ConnectPacket
[src]
impl ConnectPacket
pub fn new<P, C>(protoname: P, client_identifier: C) -> ConnectPacket where
P: Into<String>,
C: Into<String>,
[src]
pub fn new<P, C>(protoname: P, client_identifier: C) -> ConnectPacket where
P: Into<String>,
C: Into<String>,
pub fn with_level<P, C>(
protoname: P,
client_identifier: C,
level: u8
) -> ConnectPacket where
P: Into<String>,
C: Into<String>,
[src]
pub fn with_level<P, C>(
protoname: P,
client_identifier: C,
level: u8
) -> ConnectPacket where
P: Into<String>,
C: Into<String>,
pub fn set_keep_alive(&mut self, keep_alive: u16)
[src]
pub fn set_keep_alive(&mut self, keep_alive: u16)
pub fn set_user_name(&mut self, name: Option<String>)
[src]
pub fn set_user_name(&mut self, name: Option<String>)
pub fn set_will(&mut self, topic_message: Option<(TopicName, Vec<u8>)>)
[src]
pub fn set_will(&mut self, topic_message: Option<(TopicName, Vec<u8>)>)
pub fn set_password(&mut self, password: Option<String>)
[src]
pub fn set_password(&mut self, password: Option<String>)
pub fn set_client_identifier<I: Into<String>>(&mut self, id: I)
[src]
pub fn set_client_identifier<I: Into<String>>(&mut self, id: I)
pub fn set_will_retain(&mut self, will_retain: bool)
[src]
pub fn set_will_retain(&mut self, will_retain: bool)
pub fn set_will_qos(&mut self, will_qos: u8)
[src]
pub fn set_will_qos(&mut self, will_qos: u8)
pub fn set_clean_session(&mut self, clean_session: bool)
[src]
pub fn set_clean_session(&mut self, clean_session: bool)
pub fn user_name(&self) -> Option<&str>
[src]
pub fn user_name(&self) -> Option<&str>
pub fn password(&self) -> Option<&str>
[src]
pub fn password(&self) -> Option<&str>
pub fn will(&self) -> Option<(&str, &Vec<u8>)>
[src]
pub fn will(&self) -> Option<(&str, &Vec<u8>)>
pub fn will_retain(&self) -> bool
[src]
pub fn will_retain(&self) -> bool
pub fn will_qos(&self) -> u8
[src]
pub fn will_qos(&self) -> u8
pub fn client_identifier(&self) -> &str
[src]
pub fn client_identifier(&self) -> &str
pub fn clean_session(&self) -> bool
[src]
pub fn clean_session(&self) -> bool
Trait Implementations
impl Debug for ConnectPacket
[src]
impl Debug for ConnectPacket
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 ConnectPacket
[src]
impl Eq for ConnectPacket
impl PartialEq for ConnectPacket
[src]
impl PartialEq for ConnectPacket
fn eq(&self, other: &ConnectPacket) -> bool
[src]
fn eq(&self, other: &ConnectPacket) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ConnectPacket) -> bool
[src]
fn ne(&self, other: &ConnectPacket) -> bool
This method tests for !=
.
impl Packet for ConnectPacket
[src]
impl Packet for ConnectPacket
type Payload = ConnectPacketPayload
fn fixed_header(&self) -> &FixedHeader
[src]
fn fixed_header(&self) -> &FixedHeader
Get a FixedHeader
of this packet
fn payload(self) -> ConnectPacketPayload
[src]
fn payload(self) -> ConnectPacketPayload
Get the payload
fn payload_ref(&self) -> &ConnectPacketPayload
[src]
fn payload_ref(&self) -> &ConnectPacketPayload
Get a borrow of payload
fn encode_variable_headers<W: Write>(
&self,
writer: &mut W
) -> Result<(), PacketError<Self>>
[src]
fn encode_variable_headers<W: Write>(
&self,
writer: &mut W
) -> Result<(), PacketError<Self>>
Encode variable headers to writer
fn encoded_variable_headers_length(&self) -> u32
[src]
fn encoded_variable_headers_length(&self) -> u32
Length of bytes after encoding variable header
fn decode_packet<R: Read>(
reader: &mut R,
fixed_header: FixedHeader
) -> Result<Self, PacketError<Self>>
[src]
fn decode_packet<R: Read>(
reader: &mut R,
fixed_header: FixedHeader
) -> Result<Self, PacketError<Self>>
Deocde packet with a FixedHeader
impl From<ConnectPacket> for VariablePacket
[src]
impl From<ConnectPacket> for VariablePacket
fn from(pk: ConnectPacket) -> VariablePacket
[src]
fn from(pk: ConnectPacket) -> VariablePacket
Performs the conversion.
Auto Trait Implementations
impl Send for ConnectPacket
impl Send for ConnectPacket
impl Sync for ConnectPacket
impl Sync for ConnectPacket