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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for EventType
impl UnwindSafe for EventType