diff options
Diffstat (limited to 'src/client/send.rs')
-rw-r--r-- | src/client/send.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/send.rs b/src/client/send.rs index 319412b..161e130 100644 --- a/src/client/send.rs +++ b/src/client/send.rs @@ -215,13 +215,13 @@ pub struct PacketIdentifierExhausted; pub(crate) struct ClientHandlers { pub(crate) on_packet_recv: OnPacketRecvFn, - pub(crate) handle_acknowledge: HandleAcknowledgeFn, - // on_receive: Box<dyn Fn(&crate::packets::MqttPacket) + Send>, - // on_complete: Box<dyn Fn(&crate::packets::MqttPacket)+ Send>, + pub(crate) handle_qos1_acknowledge: HandleQos1AcknowledgeFn, + // handle_qos2_receive: Box<dyn Fn(&crate::packets::MqttPacket) + Send>, + // handle_qos2_complete: Box<dyn Fn(&crate::packets::MqttPacket) + Send>, } pub type OnPacketRecvFn = Box<dyn Fn(&crate::packets::MqttPacket) + Send>; -pub type HandleAcknowledgeFn = Box< +pub type HandleQos1AcknowledgeFn = Box< dyn for<'p> Fn(&'p crate::packets::MqttPacket) -> futures::future::BoxFuture<'p, Acknowledge> + Send, >; @@ -230,7 +230,7 @@ impl Default for ClientHandlers { fn default() -> Self { Self { on_packet_recv: Box::new(|_| ()), - handle_acknowledge: Box::new(|_| async move { Acknowledge::Yes }.boxed()), + handle_qos1_acknowledge: Box::new(|_| async move { Acknowledge::Yes }.boxed()), } } } |