Skip to main content

WebhookHandler

Trait WebhookHandler 

Source
pub trait WebhookHandler: Send + Sync {
    // Required methods
    fn handle_delivery_webhook<'life0, 'async_trait>(
        &'life0 self,
        payload: Value,
        signature: Option<String>,
    ) -> Pin<Box<dyn Future<Output = EmailResult<EmailDeliveryReport>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn handle_bounce_webhook<'life0, 'async_trait>(
        &'life0 self,
        payload: Value,
        signature: Option<String>,
    ) -> Pin<Box<dyn Future<Output = EmailResult<EmailDeliveryReport>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn handle_open_webhook<'life0, 'async_trait>(
        &'life0 self,
        payload: Value,
        signature: Option<String>,
    ) -> Pin<Box<dyn Future<Output = EmailResult<EmailDeliveryReport>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn handle_click_webhook<'life0, 'async_trait>(
        &'life0 self,
        payload: Value,
        signature: Option<String>,
    ) -> Pin<Box<dyn Future<Output = EmailResult<EmailDeliveryReport>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn verify_signature(&self, payload: &str, signature: &str) -> bool;
}
Expand description

Email delivery webhook handler trait

Required Methods§

Source

fn handle_delivery_webhook<'life0, 'async_trait>( &'life0 self, payload: Value, signature: Option<String>, ) -> Pin<Box<dyn Future<Output = EmailResult<EmailDeliveryReport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle delivery webhook

Source

fn handle_bounce_webhook<'life0, 'async_trait>( &'life0 self, payload: Value, signature: Option<String>, ) -> Pin<Box<dyn Future<Output = EmailResult<EmailDeliveryReport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle bounce webhook

Source

fn handle_open_webhook<'life0, 'async_trait>( &'life0 self, payload: Value, signature: Option<String>, ) -> Pin<Box<dyn Future<Output = EmailResult<EmailDeliveryReport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle open webhook

Source

fn handle_click_webhook<'life0, 'async_trait>( &'life0 self, payload: Value, signature: Option<String>, ) -> Pin<Box<dyn Future<Output = EmailResult<EmailDeliveryReport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle click webhook

Source

fn verify_signature(&self, payload: &str, signature: &str) -> bool

Verify webhook signature

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§