File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515* ` set_session_expiry_interval ` and ` session_expiry_interval ` methods on ` MqttOptions ` .
1616* ` Auth ` packet as per MQTT5 standards
1717* Allow configuring the ` nodelay ` property of underlying TCP client with the ` tcp_nodelay ` field in ` NetworkOptions `
18+ * ` set_client_id ` method on ` MqttOptions `
1819
1920### Changed
2021
Original file line number Diff line number Diff line change @@ -563,6 +563,11 @@ impl MqttOptions {
563563 self . last_will . clone ( )
564564 }
565565
566+ pub fn set_client_id ( & mut self , client_id : String ) -> & mut Self {
567+ self . client_id = client_id;
568+ self
569+ }
570+
566571 pub fn set_transport ( & mut self , transport : Transport ) -> & mut Self {
567572 self . transport = transport;
568573 self
Original file line number Diff line number Diff line change @@ -215,6 +215,11 @@ impl MqttOptions {
215215 self . request_modifier . clone ( )
216216 }
217217
218+ pub fn set_client_id ( & mut self , client_id : String ) -> & mut Self {
219+ self . client_id = client_id;
220+ self
221+ }
222+
218223 pub fn set_transport ( & mut self , transport : Transport ) -> & mut Self {
219224 self . transport = transport;
220225 self
You can’t perform that action at this time.
0 commit comments