pub trait Event {
// Required methods
fn to_bytes(&self) -> Result<Vec<u8>, EngineError>;
fn from_bytes(bytes: Vec<u8>) -> Result<Self, Box<dyn Error>>
where Self: Sized;
// Provided method
fn send(&self, pub_socket: &mut Socket) -> Result<(), EngineError> { ... }
}Expand description
Public API for defining events in an application. Events are typed messages that can be sent over a ZMQ socket. Event are equipped with functions to