Skip to main content

EventHandler

Trait EventHandler 

Source
pub trait EventHandler: Send + Sync {
    // Required method
    async fn handle(
        &self,
        function_name: &str,
        params: Value,
        tx: &mut Transaction<'_, Postgres>,
    ) -> Result<Value>;
}
Expand description

Event handler abstraction for testing

Required Methods§

Source

async fn handle( &self, function_name: &str, params: Value, tx: &mut Transaction<'_, Postgres>, ) -> Result<Value>

Handle webhook event by calling database function

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§