eventid: asref implementation
This commit is contained in:
1 parent
6d0aa0e09c
commit
684bc5f913
1 file changed
+6
@@ -83,6 +83,12 @@ impl std::str::FromStr for Event {
|
||||
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Clone, Hash)]
|
||||
pub struct EventId(String);
|
||||
|
||||
impl AsRef<str> for EventId {
|
||||
fn as_ref(&self) -> &str {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl From<String> for EventId {
|
||||
fn from(s: String) -> Self {
|
||||
EventId(s)
|
||||
|
||||
Reference in new issue
Block a user