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§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventType
impl<'de> Deserialize<'de> for EventType
Source§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 Freeze for EventType
impl RefUnwindSafe for EventType
impl Send for EventType
impl Sync for EventType
impl Unpin for EventType
impl UnwindSafe for EventType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more