#[non_exhaustive]pub struct WebhookEventPayload {
pub version: u8,
pub application_id: ApplicationId,
pub kind: PayloadType,
pub event: Option<WebhookEvent>,
}Expand description
The outer payload of a webhook event request.
Answer a PayloadType::Ping with 204 No Content (and an empty body) to validate the URL.
discord.js counterpart: APIWebhookEvent (discord-api-types).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.version: u8The payload’s version scheme (currently always 1).
application_id: ApplicationIdYour app’s ID.
kind: PayloadTypeWhether this is a PING or an event.
event: Option<WebhookEvent>The event (for PayloadType::Event).
Trait Implementations§
Source§impl Clone for WebhookEventPayload
impl Clone for WebhookEventPayload
Source§impl Debug for WebhookEventPayload
impl Debug for WebhookEventPayload
Source§impl<'de> Deserialize<'de> for WebhookEventPayload
impl<'de> Deserialize<'de> for WebhookEventPayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WebhookEventPayload
impl PartialEq for WebhookEventPayload
Source§impl Serialize for WebhookEventPayload
impl Serialize for WebhookEventPayload
impl StructuralPartialEq for WebhookEventPayload
Auto Trait Implementations§
impl Forget for WebhookEventPayload
impl Freeze for WebhookEventPayload
impl Move for WebhookEventPayload
impl RefUnwindSafe for WebhookEventPayload
impl Send for WebhookEventPayload
impl Sync for WebhookEventPayload
impl Unpin for WebhookEventPayload
impl UnsafeUnpin for WebhookEventPayload
impl UnwindSafe for WebhookEventPayload
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