[−][src]Struct mqtt::packet::connect::ConnectPacket
CONNECT packet
Implementations
impl ConnectPacket[src]
pub fn new<C>(client_identifier: C) -> ConnectPacket where
C: Into<String>, [src]
C: Into<String>,
pub fn with_level<P, C>(
protoname: P,
client_identifier: C,
level: u8
) -> Result<ConnectPacket, VariableHeaderError> where
P: Into<String>,
C: Into<String>, [src]
protoname: P,
client_identifier: C,
level: u8
) -> Result<ConnectPacket, VariableHeaderError> where
P: Into<String>,
C: Into<String>,
pub fn set_keep_alive(&mut self, keep_alive: u16)[src]
pub fn set_user_name(&mut self, name: Option<String>)[src]
pub fn set_will(&mut self, topic_message: Option<(TopicName, Vec<u8>)>)[src]
pub fn set_password(&mut self, password: Option<String>)[src]
pub fn set_client_identifier<I: Into<String>>(&mut self, id: I)[src]
pub fn set_will_retain(&mut self, will_retain: bool)[src]
pub fn set_will_qos(&mut self, will_qos: u8)[src]
pub fn set_clean_session(&mut self, clean_session: bool)[src]
pub fn user_name(&self) -> Option<&str>[src]
pub fn password(&self) -> Option<&str>[src]
pub fn will(&self) -> Option<(&str, &Vec<u8>)>[src]
pub fn will_retain(&self) -> bool[src]
pub fn will_qos(&self) -> u8[src]
pub fn client_identifier(&self) -> &str[src]
pub fn protocol_name(&self) -> &str[src]
pub fn protocol_level(&self) -> ProtocolLevel[src]
pub fn clean_session(&self) -> bool[src]
pub fn reserved_flag(&self) -> bool[src]
Read back the "reserved" Connect flag bit 0. For compliant implementations this should always be false.
Trait Implementations
impl Clone for ConnectPacket[src]
pub fn clone(&self) -> ConnectPacket[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for ConnectPacket[src]
impl Eq for ConnectPacket[src]
impl From<ConnectPacket> for VariablePacket[src]
pub fn from(pk: ConnectPacket) -> VariablePacket[src]
impl Packet for ConnectPacket[src]
type Payload = ConnectPacketPayload
pub fn fixed_header(&self) -> &FixedHeader[src]
pub fn payload(self) -> ConnectPacketPayload[src]
pub fn payload_ref(&self) -> &ConnectPacketPayload[src]
pub fn encode_variable_headers<W: Write>(
&self,
writer: &mut W
) -> Result<(), PacketError<Self>>[src]
&self,
writer: &mut W
) -> Result<(), PacketError<Self>>
pub fn encoded_variable_headers_length(&self) -> u32[src]
pub fn decode_packet<R: Read>(
reader: &mut R,
fixed_header: FixedHeader
) -> Result<Self, PacketError<Self>>[src]
reader: &mut R,
fixed_header: FixedHeader
) -> Result<Self, PacketError<Self>>
impl PartialEq<ConnectPacket> for ConnectPacket[src]
pub fn eq(&self, other: &ConnectPacket) -> bool[src]
pub fn ne(&self, other: &ConnectPacket) -> bool[src]
impl StructuralEq for ConnectPacket[src]
impl StructuralPartialEq for ConnectPacket[src]
Auto Trait Implementations
impl RefUnwindSafe for ConnectPacket[src]
impl Send for ConnectPacket[src]
impl Sync for ConnectPacket[src]
impl Unpin for ConnectPacket[src]
impl UnwindSafe for ConnectPacket[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Decodable for T where
T: 'static + Packet + Debug, [src]
T: 'static + Packet + Debug,
type Err = PacketError<T>
type Cond = FixedHeader
pub fn decode_with<R>(&mut R, Option<FixedHeader>) -> Result<T, PacketError<T>> where
R: Read, [src]
R: Read,
pub fn decode<R: Read>(reader: &mut R) -> Result<Self, Self::Err>[src]
impl<T> Encodable for T where
T: 'static + Packet + Debug, [src]
T: 'static + Packet + Debug,
type Err = PacketError<T>
pub fn encode<W>(&Self, &mut W) -> Result<(), PacketError<T>> where
W: Write, [src]
W: Write,
pub fn encoded_length(&Self) -> u32[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,