summaryrefslogtreecommitdiff
path: root/src/roomid.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/roomid.rs')
-rw-r--r--src/roomid.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/roomid.rs b/src/roomid.rs
new file mode 100644
index 0000000..1f356fa
--- /dev/null
+++ b/src/roomid.rs
@@ -0,0 +1,15 @@
+
+#[derive(Debug, PartialEq, Eq, Clone, Hash)]
+pub struct RoomId {
+ pub name: String
+}
+
+impl RoomId {
+ pub fn from_str(name: &str) -> Self {
+ Self {name: name.to_string()}
+ }
+ pub fn to_string(&self) -> String {
+ self.name.clone()
+ }
+}
+