summaryrefslogtreecommitdiff
path: root/src/header.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/header.rs')
-rw-r--r--src/header.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/header.rs b/src/header.rs
index 904e29d..61cc561 100644
--- a/src/header.rs
+++ b/src/header.rs
@@ -56,3 +56,18 @@ where
Ok(requested_at)
}
}
+
+impl From<String> for LastEventId {
+ fn from(header: String) -> Self {
+ Self(header)
+ }
+}
+
+impl std::ops::Deref for LastEventId {
+ type Target = str;
+
+ fn deref(&self) -> &Self::Target {
+ let Self(header) = self;
+ header
+ }
+}