summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mqtt-format/src/v5/packets/auth.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/mqtt-format/src/v5/packets/auth.rs b/mqtt-format/src/v5/packets/auth.rs
index c0d8880..154ca6f 100644
--- a/mqtt-format/src/v5/packets/auth.rs
+++ b/mqtt-format/src/v5/packets/auth.rs
@@ -11,6 +11,8 @@ use crate::v5::variable_header::AuthenticationData;
use crate::v5::variable_header::AuthenticationMethod;
use crate::v5::variable_header::ReasonString;
use crate::v5::variable_header::UserProperties;
+use crate::v5::write::WResult;
+use crate::v5::write::WriteMqttPacket;
use crate::v5::MResult;
crate::v5::reason_code::make_combined_reason_code! {
@@ -56,4 +58,9 @@ impl<'i> MAuth<'i> {
})
.parse_next(input)
}
+
+ pub async fn write<W: WriteMqttPacket>(&self, buffer: &mut W) -> WResult<W> {
+ self.reason.write(buffer).await?;
+ self.properties.write(buffer).await
+ }
}