#[non_exhaustive]pub enum Event {
ApplicationAuthorized(ApplicationAuthorized),
ApplicationDeauthorized(ApplicationDeauthorized),
EntitlementCreate(Entitlement),
EntitlementUpdate(Entitlement),
EntitlementDelete(Entitlement),
LobbyMessageCreate(LobbyMessage),
LobbyMessageUpdate(LobbyMessage),
LobbyMessageDelete(LobbyMessageDelete),
Unknown {
kind: String,
data: Option<Box<RawValue>>,
},
}Expand description
A Webhook Event’s typed data
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ApplicationAuthorized(ApplicationAuthorized)
The app was installed to a server or a user
A user removed the app
EntitlementCreate(Entitlement)
A user or guild bought a SKU
EntitlementUpdate(Entitlement)
An entitlement changed, e.g. a subscription renewed or ended
EntitlementDelete(Entitlement)
An entitlement was removed, e.g. refunded
LobbyMessageCreate(LobbyMessage)
A message was sent in a lobby
LobbyMessageUpdate(LobbyMessage)
A lobby message was edited
LobbyMessageDelete(LobbyMessageDelete)
A lobby message was deleted
Unknown
Any other event (game DMs, quests, events added later), or one whose data did not match its model
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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