Struct mqtt::packet::connect::ConnectPacket
[−]
[src]
pub struct ConnectPacket { /* fields omitted */ }
Methods
impl ConnectPacket
[src]
fn new(protoname: String, client_identifier: String) -> ConnectPacket
fn with_level(protoname: String,
client_identifier: String,
level: u8)
-> ConnectPacket
client_identifier: String,
level: u8)
-> ConnectPacket
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(&mut self, id: String)
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
fn payload(&self) -> &ConnectPacketPayload
fn encode_variable_headers<W: Write>(&self,
writer: &mut W)
-> Result<(), PacketError<'a, Self>>
writer: &mut W)
-> Result<(), PacketError<'a, Self>>
fn encoded_variable_headers_length(&self) -> u32
fn decode_packet<R: Read>(reader: &mut R,
fixed_header: FixedHeader)
-> Result<Self, PacketError<'a, Self>>
fixed_header: FixedHeader)
-> Result<Self, PacketError<'a, Self>>