pub struct WebhookPayload {
pub event_id: String,
pub subscription_name: String,
pub entity_type: String,
pub entity_id: String,
pub operation: String,
pub data: Value,
pub old_data: Option<Value>,
pub timestamp: String,
pub sequence_number: u64,
}Expand description
Webhook payload format for event delivery.
Fields§
§event_id: StringUnique event identifier.
subscription_name: StringSubscription name that triggered the event.
entity_type: StringEntity type (e.g., “Order”).
entity_id: StringEntity primary key.
operation: StringOperation type.
data: ValueEvent data.
old_data: Option<Value>Previous data (for UPDATE operations).
timestamp: StringEvent timestamp (ISO 8601).
sequence_number: u64Sequence number for ordering.
Implementations§
Source§impl WebhookPayload
impl WebhookPayload
Sourcepub fn from_event(event: &SubscriptionEvent, subscription_name: &str) -> Self
pub fn from_event(event: &SubscriptionEvent, subscription_name: &str) -> Self
Create a webhook payload from a subscription event.
Trait Implementations§
Source§impl Clone for WebhookPayload
impl Clone for WebhookPayload
Source§fn clone(&self) -> WebhookPayload
fn clone(&self) -> WebhookPayload
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WebhookPayload
impl Debug for WebhookPayload
Auto Trait Implementations§
impl Freeze for WebhookPayload
impl RefUnwindSafe for WebhookPayload
impl Send for WebhookPayload
impl Sync for WebhookPayload
impl Unpin for WebhookPayload
impl UnsafeUnpin for WebhookPayload
impl UnwindSafe for WebhookPayload
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