pub struct WebhookEvent {
pub id: String,
pub kind: EventKind,
pub charge: Option<Charge>,
pub transfer: Option<Transfer>,
pub raw: Json,
}Expand description
A verified event.
Built by a driver’s verify_webhook, which is the only constructor that
makes sense: an event that has not had its signature checked is a string
somebody posted.
Fields§
§id: StringThe gateway’s id for the event, or for the charge when the gateway gives events no id of their own. Deduplication keys on this together with the kind, so “charge X paid” and “charge X expired” are two events.
kind: EventKind§charge: Option<Charge>§transfer: Option<Transfer>§raw: JsonThe body exactly as received, for storage and for replaying to a handler that was broken at the time.
Implementations§
Trait Implementations§
Source§impl Clone for WebhookEvent
impl Clone for WebhookEvent
Source§impl Debug for WebhookEvent
impl Debug for WebhookEvent
Source§impl PartialEq for WebhookEvent
impl PartialEq for WebhookEvent
impl StructuralPartialEq for WebhookEvent
Auto Trait Implementations§
impl Freeze for WebhookEvent
impl RefUnwindSafe for WebhookEvent
impl Send for WebhookEvent
impl Sync for WebhookEvent
impl Unpin for WebhookEvent
impl UnsafeUnpin for WebhookEvent
impl UnwindSafe for WebhookEvent
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