We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
LinkTx::try_unsubscribe
1 parent 9686992 commit 5131e67Copy full SHA for 5131e67
rumqttd/src/link/local.rs
@@ -293,6 +293,17 @@ impl LinkTx {
293
Ok(len)
294
}
295
296
+ /// Sends a MQTT Unsubscribe to the eventloop
297
+ pub fn try_unsubscribe<S: Into<String>>(&mut self, filter: S) -> Result<usize, LinkError> {
298
+ let unsubscribe = Unsubscribe {
299
+ pkid: 0,
300
+ filters: vec![filter.into()],
301
+ };
302
+
303
+ let len = self.try_push(Packet::Unsubscribe(unsubscribe, None))?;
304
+ Ok(len)
305
+ }
306
307
/// Request to get device shadow
308
pub fn shadow<S: Into<String>>(&mut self, filter: S) -> Result<(), LinkError> {
309
let message = Event::Shadow(ShadowRequest {
0 commit comments