#[non_exhaustive]pub enum WebhookEventType {
Show 13 variants
ApplicationAuthorized,
ApplicationDeauthorized,
EntitlementCreate,
EntitlementUpdate,
EntitlementDelete,
QuestUserEnrollment,
LobbyMessageCreate,
LobbyMessageUpdate,
LobbyMessageDelete,
GameDirectMessageCreate,
GameDirectMessageUpdate,
GameDirectMessageDelete,
Unknown(CompactString),
}Expand description
A webhook event type an app can subscribe to.
discord.js counterpart: ApplicationWebhookEventType.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ApplicationAuthorized
The app was authorized by a user or in a guild.
The app was deauthorized by a user.
EntitlementCreate
An entitlement was created.
EntitlementUpdate
An entitlement was updated.
EntitlementDelete
An entitlement was deleted.
QuestUserEnrollment
A user was added to a Quest.
LobbyMessageCreate
A message was created in a lobby.
LobbyMessageUpdate
A message was updated in a lobby.
LobbyMessageDelete
A message was deleted from a lobby.
GameDirectMessageCreate
A direct message was created during a game session.
GameDirectMessageUpdate
A direct message was updated during a game session.
GameDirectMessageDelete
A direct message was deleted during a game session.
Unknown(CompactString)
A value that this version of the library does not know about.
Discord may add new values at any time. They are preserved here so that no
information is lost and deserialization never fails because of them. Prefer
WebhookEventType::from over constructing this variant directly.
Implementations§
Source§impl WebhookEventType
impl WebhookEventType
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Returns the string Discord uses for this value.
discord.js counterpart: the enum’s string value in discord-api-types.
Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns true for a value this version of the library does not know about.
discord.js counterpart: none (discord.js passes unknown strings through).
Trait Implementations§
Source§impl AsRef<str> for WebhookEventType
impl AsRef<str> for WebhookEventType
Source§impl Clone for WebhookEventType
impl Clone for WebhookEventType
Source§impl Debug for WebhookEventType
impl Debug for WebhookEventType
Source§impl<'de> Deserialize<'de> for WebhookEventType
impl<'de> Deserialize<'de> for WebhookEventType
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl Display for WebhookEventType
impl Display for WebhookEventType
impl Eq for WebhookEventType
Source§impl From<&str> for WebhookEventType
impl From<&str> for WebhookEventType
Source§impl Hash for WebhookEventType
impl Hash for WebhookEventType
Source§impl Ord for WebhookEventType
impl Ord for WebhookEventType
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for WebhookEventType
impl PartialEq for WebhookEventType
Source§impl PartialOrd for WebhookEventType
impl PartialOrd for WebhookEventType
Auto Trait Implementations§
impl Freeze for WebhookEventType
impl RefUnwindSafe for WebhookEventType
impl Send for WebhookEventType
impl Sync for WebhookEventType
impl Unpin for WebhookEventType
impl UnsafeUnpin for WebhookEventType
impl UnwindSafe for WebhookEventType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more