write_packet

Function write_packet 

pub async fn write_packet<W: AsyncWrite + Unpin>(
    writer: &mut W,
    packet: &Packet<'_>,
) -> Result<(), Error>
Expand description

Encode and write a full MQTT packet to the writer, then flush.