pub struct WebhookProcessor { /* private fields */ }Expand description
Framework-agnostic webhook processor.
Holds an InboundRegistry and drives the full inbound pipeline:
- Look up the provider in the registry.
- Verify the webhook signature (if the provider implements it).
- Parse the raw body into an
InboundMessage. - Return a
WebhookResponsethat the framework adapter can convert into its native response type.
Implementations§
Source§impl WebhookProcessor
impl WebhookProcessor
Sourcepub fn new(registry: InboundRegistry) -> Self
pub fn new(registry: InboundRegistry) -> Self
Create a processor backed by the given provider registry.
Sourcepub fn process_webhook(
&self,
provider: &str,
headers: Headers,
body: &[u8],
) -> WebhookResponse
pub fn process_webhook( &self, provider: &str, headers: Headers, body: &[u8], ) -> WebhookResponse
Process an incoming webhook request and return a framework-agnostic response.
provider is the name extracted from the URL path (e.g. "plivo").
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WebhookProcessor
impl !UnwindSafe for WebhookProcessor
impl Freeze for WebhookProcessor
impl Send for WebhookProcessor
impl Sync for WebhookProcessor
impl Unpin for WebhookProcessor
impl UnsafeUnpin for WebhookProcessor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more