[][src]Struct rumqttc::MqttState

pub struct MqttState {
    pub connection_status: MqttConnectionStatus,
    pub await_pingresp: bool,
    pub last_incoming: Instant,
    pub last_outgoing: Instant,
    pub last_pkid: u16,
    pub outgoing_pub: VecDeque<Publish>,
    pub outgoing_rel: VecDeque<u16>,
    pub incoming_pub: VecDeque<u16>,
}

State of the mqtt connection.

Fields

connection_status: MqttConnectionStatus

Connection status

await_pingresp: bool

Status of last ping

last_incoming: Instant

Last incoming packet time

last_outgoing: Instant

Last outgoing packet time

last_pkid: u16

Packet id of the last outgoing packet

outgoing_pub: VecDeque<Publish>

Outgoing QoS 1, 2 publishes which aren't acked yet

outgoing_rel: VecDeque<u16>

Packet ids of released QoS 2 publishes

incoming_pub: VecDeque<u16>

Packet ids on incoming QoS 2 publishes

Implementations

impl MqttState[src]

pub fn new() -> Self[src]

Creates new mqtt state. Same state should be used during a connection for persistent sessions while new state should instantiated for clean sessions

pub fn handle_outgoing_connect(&mut self) -> Result<(), StateError>[src]

pub fn handle_incoming_connack(
    &mut self,
    packet: Packet
) -> Result<(), StateError>
[src]

Trait Implementations

impl Clone for MqttState[src]

impl Debug for MqttState[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.