Enum serenity::model::event::EventType[][src]

#[non_exhaustive]
pub enum EventType {
Show 54 variants ChannelCreate, ChannelDelete, ChannelPinsUpdate, ChannelUpdate, GuildBanAdd, GuildBanRemove, GuildCreate, GuildDelete, GuildEmojisUpdate, GuildIntegrationsUpdate, GuildMemberAdd, GuildMemberRemove, GuildMemberUpdate, GuildMembersChunk, GuildRoleCreate, GuildRoleDelete, GuildRoleUpdate, GuildUnavailable, GuildUpdate, InviteCreate, InviteDelete, MessageCreate, MessageDelete, MessageDeleteBulk, MessageUpdate, PresenceUpdate, PresencesReplace, ReactionAdd, ReactionRemove, ReactionRemoveAll, Ready, Resumed, TypingStart, UserUpdate, VoiceStateUpdate, VoiceServerUpdate, WebhookUpdate, InteractionCreate, IntegrationCreate, IntegrationUpdate, IntegrationDelete, ApplicationCommandCreate, ApplicationCommandUpdate, ApplicationCommandDelete, StageInstanceCreate, StageInstanceUpdate, StageInstanceDelete, ThreadCreate, ThreadUpdate, ThreadDelete, ThreadListSync, ThreadMemberUpdate, ThreadMembersUpdate, Other(String),
}
Expand description

The type of event dispatch received from the gateway.

This is useful for deciding how to deserialize a received payload.

A Deserialization implementation is provided for deserializing raw event dispatch type strings to this enum, e.g. deserializing "CHANNEL_CREATE" to EventType::ChannelCreate.

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.

ChannelCreate

Indicator that a channel create payload was received.

This maps to ChannelCreateEvent.

ChannelDelete

Indicator that a channel delete payload was received.

This maps to ChannelDeleteEvent.

ChannelPinsUpdate

Indicator that a channel pins update payload was received.

This maps to ChannelPinsUpdateEvent.

ChannelUpdate

Indicator that a channel update payload was received.

This maps to ChannelUpdateEvent.

GuildBanAdd

Indicator that a guild ban addition payload was received.

This maps to GuildBanAddEvent.

GuildBanRemove

Indicator that a guild ban removal payload was received.

This maps to GuildBanRemoveEvent.

GuildCreate

Indicator that a guild create payload was received.

This maps to GuildCreateEvent.

GuildDelete

Indicator that a guild delete payload was received.

This maps to GuildDeleteEvent.

GuildEmojisUpdate

Indicator that a guild emojis update payload was received.

This maps to GuildEmojisUpdateEvent.

GuildIntegrationsUpdate

Indicator that a guild integrations update payload was received.

This maps to GuildIntegrationsUpdateEvent.

GuildMemberAdd

Indicator that a guild member add payload was received.

This maps to GuildMemberAddEvent.

GuildMemberRemove

Indicator that a guild member remove payload was received.

This maps to GuildMemberRemoveEvent.

GuildMemberUpdate

Indicator that a guild member update payload was received.

This maps to GuildMemberUpdateEvent.

GuildMembersChunk

Indicator that a guild members chunk payload was received.

This maps to GuildMembersChunkEvent.

GuildRoleCreate

Indicator that a guild role create payload was received.

This maps to GuildRoleCreateEvent.

GuildRoleDelete

Indicator that a guild role delete payload was received.

This maps to GuildRoleDeleteEvent.

GuildRoleUpdate

Indicator that a guild role update payload was received.

This maps to GuildRoleUpdateEvent.

GuildUnavailable

Indicator that a guild unavailable payload was received.

This maps to GuildUnavailableEvent.

GuildUpdate

Indicator that a guild update payload was received.

This maps to GuildUpdateEvent.

InviteCreate

Indicator that an invite was created.

This maps to InviteCreateEvent.

InviteDelete

Indicator that an invite was deleted.

This maps to InviteDeleteEvent.

MessageCreate

Indicator that a message create payload was received.

This maps to MessageCreateEvent.

MessageDelete

Indicator that a message delete payload was received.

This maps to MessageDeleteEvent.

MessageDeleteBulk

Indicator that a message delete bulk payload was received.

This maps to MessageDeleteBulkEvent.

MessageUpdate

Indicator that a message update payload was received.

This maps to MessageUpdateEvent.

PresenceUpdate

Indicator that a presence update payload was received.

This maps to PresenceUpdateEvent.

PresencesReplace

Indicator that a presences replace payload was received.

This maps to PresencesReplaceEvent.

ReactionAdd

Indicator that a reaction add payload was received.

This maps to ReactionAddEvent.

ReactionRemove

Indicator that a reaction remove payload was received.

This maps to ReactionRemoveEvent.

ReactionRemoveAll

Indicator that a reaction remove all payload was received.

This maps to ReactionRemoveAllEvent.

Ready

Indicator that a ready payload was received.

This maps to ReadyEvent.

Resumed

Indicator that a resumed payload was received.

This maps to ResumedEvent.

TypingStart

Indicator that a typing start payload was received.

This maps to TypingStartEvent.

UserUpdate

Indicator that a user update payload was received.

This maps to UserUpdateEvent.

VoiceStateUpdate

Indicator that a voice state payload was received.

This maps to VoiceStateUpdateEvent.

VoiceServerUpdate

Indicator that a voice server update payload was received.

This maps to VoiceServerUpdateEvent.

WebhookUpdate

Indicator that a webhook update payload was received.

This maps to WebhookUpdateEvent.

InteractionCreate

Indicator that an interaction was created.

This maps to InteractionCreateEvent.

IntegrationCreate

Indicator that an integration was created.

This maps to IntegrationCreateEvent.

IntegrationUpdate

Indicator that an integration was created.

This maps to IntegrationUpdateEvent.

IntegrationDelete

Indicator that an integration was created.

This maps to IntegrationDeleteEvent.

ApplicationCommandCreate

👎 Deprecated since 0.10.10:

bots do no receive this event

Indicator that an application command was created.

This maps to ApplicationCommandCreateEvent.

ApplicationCommandUpdate

👎 Deprecated since 0.10.10:

bots do no receive this event

Indicator that an application command was updated.

This maps to ApplicationCommandUpdateEvent.

ApplicationCommandDelete

👎 Deprecated since 0.10.10:

bots do no receive this event

Indicator that an application command was deleted.

This maps to ApplicationCommandDeleteEvent.

StageInstanceCreate

Indicator that a stage instance was created.

This maps to StageInstanceCreateEvent.

StageInstanceUpdate

Indicator that a stage instance was updated.

This maps to StageInstanceUpdateEvent.

StageInstanceDelete

Indicator that a stage instance was deleted.

This maps to StageInstanceDeleteEvent.

ThreadCreate

Indicator that a thread was created or the current user was added to a private thread.

This maps to ThreadCreateEvent.

ThreadUpdate

Indicator that a thread was updated.

This maps to ThreadUpdateEvent.

ThreadDelete

Indicator that a thread was deleted.

This maps to ThreadDeleteEvent.

ThreadListSync

Indicator that the current user gains access to a channel.

This maps to ThreadListSyncEvent

ThreadMemberUpdate

Indicator that the ThreadMember object for the current user is updated.

This maps to ThreadMemberUpdateEvent

ThreadMembersUpdate

Indicator that anyone is added to or removed from a thread.

This maps to ThreadMembersUpdateEvent

Other(String)

Tuple Fields

0: String

An unknown event was received over the gateway.

This should be logged so that support for it can be added in the library.

Implementations

Return the event name of this event. Some events are synthetic, and we lack the information to recover the original event name for these events, in which case this method returns None.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Performs the conversion.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more