Enum egg_mode::raw::types::direct::EventType[][src]

pub enum EventType {
    MessageCreate(RawDirectMessage),
}
Expand description

Wrapper enum to represent a DMEvent in the Account Activity API.

As direct messages are part of the Account Activity API, they are presented as an event type in a broader event envelope. This enum mainly encapsulates the requirement that direct messages are returned as the message_create event type with the proper data structure.

Variants

MessageCreate(RawDirectMessage)

A message_create event, representing a direct message.

The message_create event structure is flattened into a RawDirectMessage when deserializing. It should be combined with the apps map in a SingleEvent or EventCursor when converting into a DirectMessage.

Implementations

Returns the inner RawDirectMessage structure from the message_create event.

Trait Implementations

Deserialize this value from the given Serde deserializer. 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

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

Performs the conversion.

Should always be Self

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.