pub trait MqttWrite: WriteBytesExt {
fn write_packet(&mut self, packet: &Packet) -> Result<()> { ... }
fn write_mqtt_string(&mut self, string: &str) -> Result<()> { ... }
fn write_remaining_length(&mut self, len: usize) -> Result<()> { ... }
}