pub fn new() -> Self {
        const LEN: usize = core::mem::size_of::<PublishNotification>()
            + core::mem::align_of::<PublishNotification>()
            - core::mem::size_of::<PublishNotification>()
                % core::mem::align_of::<PublishNotification>();

        static mut PUBLISH_MEM: [u8; LEN] = [0u8; LEN];
        BOXED_PUBLISH::grow(unsafe { &mut PUBLISH_MEM });

        MqttState {
            connection_status: MqttConnectionStatus::Disconnected,
            await_pingresp: false,
            last_pid: Pid::new(),

            outgoing_pub: IndexMap::new(),
            outgoing_rel: IndexSet::new(),
            incoming_pub: IndexSet::new(),
            last_ping: StartTime::default(),
        }
    }
/// Creates new mqtt state. Same state should be used during a
/// connection for persistent sessions while new state should
/// instantiated for clean sessions
Creates new mqtt state. Same state should be used during a
connection for persistent sessions while new state should
instantiated for clean sessions
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 new() -> Self {
        const LEN: usize = core::mem::size_of::<PublishNotification>()
            + core::mem::align_of::<PublishNotification>()
            - core::mem::size_of::<PublishNotification>()
                % core::mem::align_of::<PublishNotification>();
        static mut PUBLISH_MEM: [u8; LEN] = [0u8; LEN];
        BOXED_PUBLISH::grow(unsafe { &mut PUBLISH_MEM });
        MqttState {
            connection_status: MqttConnectionStatus::Disconnected,
            await_pingresp: false,
            last_pid: Pid::new(),
            outgoing_pub: IndexMap::new(),
            outgoing_rel: IndexSet::new(),
            incoming_pub: IndexSet::new(),
            last_ping: StartTime::default(),
        }
    }
pub fn new ( ) -> Self { const LEN : usize = core :: mem :: size_of :: < PublishNotification > ( ) + core :: mem :: align_of :: < PublishNotification > ( ) - core :: mem :: size_of :: < PublishNotification > ( ) % core :: mem :: align_of :: < PublishNotification > ( ) ; static mut PUBLISH_MEM : [ u8 ; LEN ] = [ 0u8 ; LEN ] ; BOXED_PUBLISH :: grow ( unsafe { & mut PUBLISH_MEM } ) ; MqttState { connection_status : MqttConnectionStatus :: Disconnected , await_pingresp : false , last_pid : Pid :: new ( ) , outgoing_pub : IndexMap :: new ( ) , outgoing_rel : IndexSet :: new ( ) , incoming_pub : IndexSet :: new ( ) , last_ping : StartTime :: default ( ) , } }
Creates new mqtt state.
Creates new mqtt state .