diff options
author | Marcel Müller <neikos@neikos.email> | 2024-03-21 13:50:22 +0100 |
---|---|---|
committer | Marcel Müller <neikos@neikos.email> | 2024-03-21 13:50:22 +0100 |
commit | bf08d6945489ffa6d8074d613fbce4e4624d1a93 (patch) | |
tree | 5c1e37183bc14495cbfe516b4599bf8ac0df083f /mqtt-format | |
parent | fd7d98c3e42f0a0984d7e18614ff029fd97f8cf3 (diff) |
fixup! Implement MUnsubscribe::writefeature/add_v5_writing
Diffstat (limited to 'mqtt-format')
-rw-r--r-- | mqtt-format/src/v5/packets/unsubscribe.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mqtt-format/src/v5/packets/unsubscribe.rs b/mqtt-format/src/v5/packets/unsubscribe.rs index aa02bac..399ec86 100644 --- a/mqtt-format/src/v5/packets/unsubscribe.rs +++ b/mqtt-format/src/v5/packets/unsubscribe.rs @@ -105,6 +105,7 @@ impl<'i> Unsubscription<'i> { }) .parse_next(input) } + pub async fn write<W: WriteMqttPacket>(&self, buffer: &mut W) -> WResult<W> { write_string(buffer, self.topic_filter).await } @@ -136,4 +137,10 @@ impl<'i> MUnsubscribe<'i> { }) .parse_next(input) } + + pub async fn write<W: WriteMqttPacket>(&self, buffer: &mut W) -> WResult<W> { + self.packet_identifier.write(buffer).await?; + self.properties.write(buffer).await?; + self.unsubscriptions.write(buffer).await + } } |