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