pub trait EventType {
// Required methods
fn get_name(&self) -> String;
fn get_filter(&self) -> Result<Vec<u8>, EngineError>;
}Expand description
An event type in the application. Event types have a name, which be used to specify subscriptions by components (plugins) in applications. They also have a filter, which is a byte array that appears at the beginning of every message of the type. The filter must uniquely determine messages to b of said type.
Required Methods§
Sourcefn get_filter(&self) -> Result<Vec<u8>, EngineError>
fn get_filter(&self) -> Result<Vec<u8>, EngineError>
compute the byte array filter for all messages of this event type. The filter must uniquely determine this event type. The default implementation just returns the event name as bytes.