1 2 3 4 5 6 7 8 9 10 11
use chrono::prelude::*; use chrono::DateTime; use std::borrow::Cow; use std::collections::HashSet; pub trait Event { fn id(&self) -> Cow<str>; fn timestamp(&self) -> &DateTime<Utc>; fn event_type(&self) -> &str; fn tags(&self) -> HashSet<String>; }