diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-01-16 10:03:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-16 10:03:01 +0000 |
commit | d396c2b8ac52e509a157d65d55ffdcff0de8719a (patch) | |
tree | e12ef5d84c355c6db2a9974328ff9ac28bda6065 | |
parent | 33d6c785c5efbea0597a9ecedfc9620987ab4756 (diff) | |
parent | 6476642f97817308f7e97072f29f5a45c1cf994d (diff) |
Merge #139release/0.3.x
139: Chore/backport client id access r=TheNeikos a=TheNeikos
Co-authored-by: Marcel Müller <neikos@neikos.email>
-rw-r--r-- | CHANGELOG.md | 8 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/server/mod.rs | 5 |
3 files changed, 14 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index de9cdad..ca9e5b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog 'cloudmqtt' +## v0.3.1 + +The 0.3.1 public release of the cloudmqtt crate. It is still considered to be in an alpha state. + +Added: + +- Added method to access the String inside a ClientId + ## v0.3.0 The 0.3.0 public release of the cloudmqtt crate. It is still considered to be in an alpha state. @@ -1,6 +1,6 @@ [package] name = "cloudmqtt" -version = "0.3.0" +version = "0.3.1" edition = "2021" authors = ["Marcel Müller <neikos@neikos.email>"] description = "A pure Rust MQTT client and server library" diff --git a/src/server/mod.rs b/src/server/mod.rs index 17f1f97..a252ca4 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -78,6 +78,11 @@ impl ClientId { pub(crate) fn new(id: String) -> Self { ClientId(id) } + + /// Get the inner client id + pub fn get(&self) -> &str { + &self.0 + } } impl<'message> TryFrom<MString<'message>> for ClientId { |