summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2023-01-16 10:03:01 +0000
committerGitHub <noreply@github.com>2023-01-16 10:03:01 +0000
commitd396c2b8ac52e509a157d65d55ffdcff0de8719a (patch)
treee12ef5d84c355c6db2a9974328ff9ac28bda6065
parent33d6c785c5efbea0597a9ecedfc9620987ab4756 (diff)
parent6476642f97817308f7e97072f29f5a45c1cf994d (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.md8
-rw-r--r--Cargo.toml2
-rw-r--r--src/server/mod.rs5
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.
diff --git a/Cargo.toml b/Cargo.toml
index 758ab93..ac2e6be 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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 {