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

#[non_exhaustive]pub enum EventType {
    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,
    Other(String),
}

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)

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.

Other(String)

An unknown event was received over the gateway.

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

Trait Implementations

impl Clone for EventType[src]

impl Debug for EventType[src]

impl<'de> Deserialize<'de> for EventType[src]

impl Eq for EventType[src]

impl Ord for EventType[src]

impl PartialEq<EventType> for EventType[src]

impl PartialOrd<EventType> for EventType[src]

impl StructuralEq for EventType[src]

impl StructuralPartialEq for EventType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]