pub trait EventTrait {
// Required methods
fn new() -> Self
where Self: Sized;
fn get_type(&self) -> &str;
fn validate(&self, params: &HashMap<String, Value>) -> Result<(), String>;
fn trigger<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
params: &'life1 HashMap<String, Value>,
facts: &'life2 (dyn ErasedSerialize + Sync),
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Required Methods§
fn new() -> Selfwhere
Self: Sized,
fn get_type(&self) -> &str
fn validate(&self, params: &HashMap<String, Value>) -> Result<(), String>
fn trigger<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
params: &'life1 HashMap<String, Value>,
facts: &'life2 (dyn ErasedSerialize + Sync),
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".