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

pub enum EventType {
    ChannelCreate,
    ChannelDelete,
    ChannelPinsUpdate,
    ChannelRecipientAdd,
    ChannelRecipientRemove,
    ChannelUpdate,
    GuildBanAdd,
    GuildBanRemove,
    GuildCreate,
    GuildDelete,
    GuildEmojisUpdate,
    GuildIntegrationsUpdate,
    GuildMemberAdd,
    GuildMemberRemove,
    GuildMemberUpdate,
    GuildMembersChunk,
    GuildRoleCreate,
    GuildRoleDelete,
    GuildRoleUpdate,
    GuildUnavailable,
    GuildUpdate,
    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

Indicator that a channel create payload was received.

This maps to ChannelCreateEvent.

Indicator that a channel delete payload was received.

This maps to ChannelDeleteEvent.

Indicator that a channel pins update payload was received.

This maps to ChannelPinsUpdateEvent.

Indicator that a channel recipient addition payload was received.

This maps to ChannelRecipientAddEvent.

Indicator that a channel recipient removal payload was received.

This maps to ChannelRecipientRemoveEvent.

Indicator that a channel update payload was received.

This maps to ChannelUpdateEvent.

Indicator that a guild ban addition payload was received.

This maps to GuildBanAddEvent.

Indicator that a guild ban removal payload was received.

This maps to GuildBanRemoveEvent.

Indicator that a guild create payload was received.

This maps to GuildCreateEvent.

Indicator that a guild delete payload was received.

This maps to GuildDeleteEvent.

Indicator that a guild emojis update payload was received.

This maps to GuildEmojisUpdateEvent.

Indicator that a guild integrations update payload was received.

This maps to GuildIntegrationsUpdateEvent.

Indicator that a guild member add payload was received.

This maps to GuildMemberAddEvent.

Indicator that a guild member remove payload was received.

This maps to GuildMemberRemoveEvent.

Indicator that a guild member update payload was received.

This maps to GuildMemberUpdateEvent.

Indicator that a guild members chunk payload was received.

This maps to GuildMembersChunkEvent.

Indicator that a guild role create payload was received.

This maps to GuildRoleCreateEvent.

Indicator that a guild role delete payload was received.

This maps to GuildRoleDeleteEvent.

Indicator that a guild role update payload was received.

This maps to GuildRoleUpdateEvent.

Indicator that a guild unavailable payload was received.

This maps to GuildUnavailableEvent.

Indicator that a guild update payload was received.

This maps to GuildUpdateEvent.

Indicator that a message create payload was received.

This maps to MessageCreateEvent.

Indicator that a message delete payload was received.

This maps to MessageDeleteEvent.

Indicator that a message delete bulk payload was received.

This maps to MessageDeleteBulkEvent.

Indicator that a message update payload was received.

This maps to MessageUpdateEvent.

Indicator that a presence update payload was received.

This maps to PresenceUpdateEvent.

Indicator that a presences replace payload was received.

This maps to PresencesReplaceEvent.

Indicator that a reaction add payload was received.

This maps to ReactionAddEvent.

Indicator that a reaction remove payload was received.

This maps to ReactionRemoveEvent.

Indicator that a reaction remove all payload was received.

This maps to ReactionRemoveAllEvent.

Indicator that a ready payload was received.

This maps to ReadyEvent.

Indicator that a resumed payload was received.

This maps to ResumedEvent.

Indicator that a typing start payload was received.

This maps to TypingStartEvent.

Indicator that a user update payload was received.

This maps to UserUpdateEvent.

Indicator that a voice state payload was received.

This maps to VoiceStateUpdateEvent.

Indicator that a voice server update payload was received.

This maps to VoiceServerUpdateEvent.

Indicator that a webhook update payload was received.

This maps to WebhookUpdateEvent.

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 PartialOrd<EventType> for EventType
[src]

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

impl Ord for EventType
[src]

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

impl PartialEq<EventType> for EventType
[src]

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

This method tests for !=.

impl Clone for EventType
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for EventType
[src]

impl Debug for EventType
[src]

Formats the value using the given formatter. Read more

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

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

impl Send for EventType

impl Sync for EventType

Blanket Implementations

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

Performs the conversion.

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

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

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

recently added

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

impl<T> From for T
[src]

Performs the conversion.

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

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

impl<T> Erased for T

impl<T> Typeable for T where
    T: Any

Get the TypeId of this object.

impl<T> DebugAny for T where
    T: Any + Debug
[src]

impl<T> CloneAny for T where
    T: Clone + Any
[src]

impl<T> UnsafeAny for T where
    T: Any