use super::Event;
/// A trait for types that can be converted into an event. Any given type that
/// implements this trait can be published as an event.
pub trait IntoEvent: Clone {
/// Consume the type, producing an [`Event`]
fn into_event(self) -> Event;
}
impl<T> IntoEvent for T
where
T: Into<Event> + Clone,
{
fn into_event(self) -> Event {
self.clone().into()
}
}