pub struct WebhookContext {
pub payload: Value,
pub delivery_id: Option<String>,
}Expand description
What a webhook handler registered via Runtime::webhook_with_context receives.
§Examples
use ironflow_runtime::prelude::*;
let runtime = Runtime::new().webhook_with_context(
"/hooks/github",
WebhookAuth::github("secret"),
|ctx: WebhookContext| async move {
println!("{} from {:?}", ctx.payload, ctx.delivery_id);
},
);Fields§
§payload: ValueThe parsed JSON body.
delivery_id: Option<String>Provider delivery identifier, already prefixed (github:…, gitlab:…).
None when the provider sent no known delivery header. Suitable as-is
for the Idempotency-Key header of POST /api/v1/runs.
Trait Implementations§
Source§impl Clone for WebhookContext
impl Clone for WebhookContext
Source§fn clone(&self) -> WebhookContext
fn clone(&self) -> WebhookContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WebhookContext
impl RefUnwindSafe for WebhookContext
impl Send for WebhookContext
impl Sync for WebhookContext
impl Unpin for WebhookContext
impl UnsafeUnpin for WebhookContext
impl UnwindSafe for WebhookContext
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