pub fn handle_outgoing_request(
        &mut self,
        request: &mut SerializedPacket<'_>,
        now: &TIM,
    ) -> Result<(), StateError> {
        match request.header()?.typ {
            PacketType::Publish => self.handle_outgoing_publish(request, now)?,
            PacketType::Subscribe => request.set_pid(self.next_pid())?,
            PacketType::Unsubscribe => request.set_pid(self.next_pid())?,
            _ => unreachable!(),
        }
        Ok(())
    }
/// Consolidates handling of all outgoing mqtt packet logic. Returns a
/// packet which should be put on to the network by the eventloop
Consolidates handling of all outgoing mqtt packet logic. Returns a
packet which should be put on to the network by the eventloop
Consolidates handling of all outgoing mqtt packet logic . Returns a packet which should be put on to the network by the eventloop
pub fn handle_outgoing_request(
        &mut self,
        request: &mut SerializedPacket<'_>,
        now: &TIM,
    ) -> Result<(), StateError> {
        match request.header()?.typ {
            PacketType::Publish => self.handle_outgoing_publish(request, now)?,
            PacketType::Subscribe => request.set_pid(self.next_pid())?,
            PacketType::Unsubscribe => request.set_pid(self.next_pid())?,
            _ => unreachable!(),
        }
        Ok(())
    }
pub fn handle_outgoing_request ( & mut self , request : & mut SerializedPacket < ' _ > , now : & TIM , ) -> Result < ( ) , StateError > { match request . header ( ) ? . typ { PacketType :: Publish => self . handle_outgoing_publish ( request , now ) ? , PacketType :: Subscribe => request . set_pid ( self . next_pid ( ) ) ? , PacketType :: Unsubscribe => request . set_pid ( self . next_pid ( ) ) ? , _ => unreachable ! ( ) , } Ok ( ( ) ) }
Consolidates handling of all outgoing mqtt packet logic.
Consolidates handling of all outgoing mqtt packet logic .
&mut self
request
&mut SerializedPacket<'_>
now
&TIM
&mut self
request
&mut SerializedPacket<'_>
now
&TIM