pub trait WebhookHandler: Send + Sync {
// Required methods
fn path(&self) -> String;
fn handle<'life0, 'async_trait>(
&'life0 self,
request: WebhookRequest,
) -> Pin<Box<dyn Future<Output = WebhookResponse> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Receives webhook requests for one channel.
Implementations authenticate the request, hand events to the runtime and return quickly: platforms time out slow webhooks, and agent turns are slow.
Required Methods§
Sourcefn handle<'life0, 'async_trait>(
&'life0 self,
request: WebhookRequest,
) -> Pin<Box<dyn Future<Output = WebhookResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
request: WebhookRequest,
) -> Pin<Box<dyn Future<Output = WebhookResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handles one request.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".