[−][src]Struct mqtt::control::fixed_header::FixedHeader
Fixed header for each MQTT control packet
Format:
7 3 0
+--------------------------+--------------------------+
| MQTT Control Packet Type | Flags for each type |
+--------------------------+--------------------------+
| Remaining Length ... |
+-----------------------------------------------------+
Fields
packet_type: PacketTypePacket Type
remaining_length: u32The Remaining Length is the number of bytes remaining within the current packet, including data in the variable header and the payload. The Remaining Length does not include the bytes used to encode the Remaining Length.
Implementations
impl FixedHeader[src]
pub fn new(packet_type: PacketType, remaining_length: u32) -> FixedHeader[src]
Trait Implementations
impl Clone for FixedHeader[src]
pub fn clone(&self) -> FixedHeader[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for FixedHeader[src]
impl Debug for FixedHeader[src]
impl Decodable for FixedHeader[src]
type Err = FixedHeaderError
type Cond = ()
pub fn decode_with<R: Read>(
rdr: &mut R,
_rest: Option<()>
) -> Result<FixedHeader, FixedHeaderError>[src]
rdr: &mut R,
_rest: Option<()>
) -> Result<FixedHeader, FixedHeaderError>
pub fn decode<R: Read>(reader: &mut R) -> Result<Self, Self::Err>[src]
impl Encodable for FixedHeader[src]
type Err = FixedHeaderError
pub fn encode<W: Write>(&self, wr: &mut W) -> Result<(), FixedHeaderError>[src]
pub fn encoded_length(&self) -> u32[src]
impl Eq for FixedHeader[src]
impl PartialEq<FixedHeader> for FixedHeader[src]
pub fn eq(&self, other: &FixedHeader) -> bool[src]
pub fn ne(&self, other: &FixedHeader) -> bool[src]
impl StructuralEq for FixedHeader[src]
impl StructuralPartialEq for FixedHeader[src]
Auto Trait Implementations
impl RefUnwindSafe for FixedHeader[src]
impl Send for FixedHeader[src]
impl Sync for FixedHeader[src]
impl Unpin for FixedHeader[src]
impl UnwindSafe for FixedHeader[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> 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>,