Enum twilight_model::gateway::event::DispatchEvent
source · pub enum DispatchEvent {
Show 64 variants
AutoModerationActionExecution(AutoModerationActionExecution),
AutoModerationRuleCreate(Box<AutoModerationRuleCreate>),
AutoModerationRuleDelete(Box<AutoModerationRuleDelete>),
AutoModerationRuleUpdate(Box<AutoModerationRuleUpdate>),
BanAdd(BanAdd),
BanRemove(BanRemove),
ChannelCreate(Box<ChannelCreate>),
ChannelDelete(Box<ChannelDelete>),
ChannelPinsUpdate(ChannelPinsUpdate),
ChannelUpdate(Box<ChannelUpdate>),
CommandPermissionsUpdate(CommandPermissionsUpdate),
GiftCodeUpdate,
GuildAuditLogEntryCreate(Box<GuildAuditLogEntryCreate>),
GuildCreate(Box<GuildCreate>),
GuildDelete(GuildDelete),
GuildEmojisUpdate(GuildEmojisUpdate),
GuildIntegrationsUpdate(GuildIntegrationsUpdate),
GuildScheduledEventCreate(Box<GuildScheduledEventCreate>),
GuildScheduledEventDelete(Box<GuildScheduledEventDelete>),
GuildScheduledEventUpdate(Box<GuildScheduledEventUpdate>),
GuildScheduledEventUserAdd(GuildScheduledEventUserAdd),
GuildScheduledEventUserRemove(GuildScheduledEventUserRemove),
GuildStickersUpdate(GuildStickersUpdate),
GuildUpdate(Box<GuildUpdate>),
IntegrationCreate(Box<IntegrationCreate>),
IntegrationDelete(IntegrationDelete),
IntegrationUpdate(Box<IntegrationUpdate>),
InteractionCreate(Box<InteractionCreate>),
InviteCreate(Box<InviteCreate>),
InviteDelete(InviteDelete),
MemberAdd(Box<MemberAdd>),
MemberRemove(MemberRemove),
MemberUpdate(Box<MemberUpdate>),
MemberChunk(MemberChunk),
MessageCreate(Box<MessageCreate>),
MessageDelete(MessageDelete),
MessageDeleteBulk(MessageDeleteBulk),
MessageUpdate(Box<MessageUpdate>),
PresenceUpdate(Box<PresenceUpdate>),
PresencesReplace,
ReactionAdd(Box<ReactionAdd>),
ReactionRemove(Box<ReactionRemove>),
ReactionRemoveAll(ReactionRemoveAll),
ReactionRemoveEmoji(ReactionRemoveEmoji),
Ready(Box<Ready>),
Resumed,
RoleCreate(RoleCreate),
RoleDelete(RoleDelete),
RoleUpdate(RoleUpdate),
StageInstanceCreate(StageInstanceCreate),
StageInstanceDelete(StageInstanceDelete),
StageInstanceUpdate(StageInstanceUpdate),
ThreadCreate(Box<ThreadCreate>),
ThreadDelete(ThreadDelete),
ThreadListSync(ThreadListSync),
ThreadMemberUpdate(Box<ThreadMemberUpdate>),
ThreadMembersUpdate(ThreadMembersUpdate),
ThreadUpdate(Box<ThreadUpdate>),
TypingStart(Box<TypingStart>),
UnavailableGuild(UnavailableGuild),
UserUpdate(UserUpdate),
VoiceServerUpdate(VoiceServerUpdate),
VoiceStateUpdate(Box<VoiceStateUpdate>),
WebhooksUpdate(WebhooksUpdate),
}
Expand description
A dispatch event, containing information about a created guild, a member added, etc.
You can deserialize into a DispatchEvent
via
DispatchEventWithTypeDeserializer
.
Variants§
AutoModerationActionExecution(AutoModerationActionExecution)
AutoModerationRuleCreate(Box<AutoModerationRuleCreate>)
AutoModerationRuleDelete(Box<AutoModerationRuleDelete>)
AutoModerationRuleUpdate(Box<AutoModerationRuleUpdate>)
BanAdd(BanAdd)
BanRemove(BanRemove)
ChannelCreate(Box<ChannelCreate>)
ChannelDelete(Box<ChannelDelete>)
ChannelPinsUpdate(ChannelPinsUpdate)
ChannelUpdate(Box<ChannelUpdate>)
CommandPermissionsUpdate(CommandPermissionsUpdate)
GiftCodeUpdate
GuildAuditLogEntryCreate(Box<GuildAuditLogEntryCreate>)
GuildCreate(Box<GuildCreate>)
GuildDelete(GuildDelete)
GuildEmojisUpdate(GuildEmojisUpdate)
GuildIntegrationsUpdate(GuildIntegrationsUpdate)
GuildScheduledEventCreate(Box<GuildScheduledEventCreate>)
GuildScheduledEventDelete(Box<GuildScheduledEventDelete>)
GuildScheduledEventUpdate(Box<GuildScheduledEventUpdate>)
GuildScheduledEventUserAdd(GuildScheduledEventUserAdd)
GuildScheduledEventUserRemove(GuildScheduledEventUserRemove)
GuildStickersUpdate(GuildStickersUpdate)
GuildUpdate(Box<GuildUpdate>)
IntegrationCreate(Box<IntegrationCreate>)
IntegrationDelete(IntegrationDelete)
IntegrationUpdate(Box<IntegrationUpdate>)
InteractionCreate(Box<InteractionCreate>)
InviteCreate(Box<InviteCreate>)
InviteDelete(InviteDelete)
MemberAdd(Box<MemberAdd>)
MemberRemove(MemberRemove)
MemberUpdate(Box<MemberUpdate>)
MemberChunk(MemberChunk)
MessageCreate(Box<MessageCreate>)
MessageDelete(MessageDelete)
MessageDeleteBulk(MessageDeleteBulk)
MessageUpdate(Box<MessageUpdate>)
PresenceUpdate(Box<PresenceUpdate>)
PresencesReplace
ReactionAdd(Box<ReactionAdd>)
ReactionRemove(Box<ReactionRemove>)
ReactionRemoveAll(ReactionRemoveAll)
ReactionRemoveEmoji(ReactionRemoveEmoji)
Ready(Box<Ready>)
Resumed
RoleCreate(RoleCreate)
RoleDelete(RoleDelete)
RoleUpdate(RoleUpdate)
StageInstanceCreate(StageInstanceCreate)
StageInstanceDelete(StageInstanceDelete)
StageInstanceUpdate(StageInstanceUpdate)
ThreadCreate(Box<ThreadCreate>)
ThreadDelete(ThreadDelete)
ThreadListSync(ThreadListSync)
ThreadMemberUpdate(Box<ThreadMemberUpdate>)
ThreadMembersUpdate(ThreadMembersUpdate)
ThreadUpdate(Box<ThreadUpdate>)
TypingStart(Box<TypingStart>)
UserUpdate(UserUpdate)
VoiceServerUpdate(VoiceServerUpdate)
VoiceStateUpdate(Box<VoiceStateUpdate>)
WebhooksUpdate(WebhooksUpdate)
Implementations§
Trait Implementations§
source§impl Clone for DispatchEvent
impl Clone for DispatchEvent
source§fn clone(&self) -> DispatchEvent
fn clone(&self) -> DispatchEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DispatchEvent
impl Debug for DispatchEvent
source§impl From<DispatchEvent> for Event
impl From<DispatchEvent> for Event
source§fn from(event: DispatchEvent) -> Self
fn from(event: DispatchEvent) -> Self
Converts to this type from the input type.
source§impl PartialEq<DispatchEvent> for DispatchEvent
impl PartialEq<DispatchEvent> for DispatchEvent
source§fn eq(&self, other: &DispatchEvent) -> bool
fn eq(&self, other: &DispatchEvent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for DispatchEvent
impl Serialize for DispatchEvent
source§impl TryFrom<Event> for DispatchEvent
impl TryFrom<Event> for DispatchEvent
impl StructuralPartialEq for DispatchEvent
Auto Trait Implementations§
impl RefUnwindSafe for DispatchEvent
impl Send for DispatchEvent
impl Sync for DispatchEvent
impl Unpin for DispatchEvent
impl UnwindSafe for DispatchEvent
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