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