summaryrefslogtreecommitdiffstats
path: root/src/client/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/mod.rs')
-rw-r--r--src/client/mod.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs
index 72780b3..8ff460f 100644
--- a/src/client/mod.rs
+++ b/src/client/mod.rs
@@ -4,6 +4,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
+pub mod builder;
pub mod connect;
mod receive;
pub mod send;
@@ -36,14 +37,15 @@ impl MqttClient {
inner: Arc::new(Mutex::new(InnerClient {
connection_state: None,
session_state: None,
- default_handlers: ClientHandlers {
- on_packet_recv: Box::new(|_| ()),
- handle_acknowledge: Box::new(|_| Acknowledge::Yes),
- },
+ default_handlers: ClientHandlers::default(),
outstanding_callbacks: Callbacks::new(),
})),
}
}
+
+ pub fn builder() -> builder::MqttClientBuilder {
+ builder::MqttClientBuilder::new()
+ }
}
#[cfg(test)]