Enum twilight_model::gateway::event::DispatchEvent
source · [−]pub enum DispatchEvent {
Show 52 variants
BanAdd(BanAdd),
BanRemove(BanRemove),
ChannelCreate(ChannelCreate),
ChannelDelete(ChannelDelete),
ChannelPinsUpdate(ChannelPinsUpdate),
ChannelUpdate(ChannelUpdate),
GiftCodeUpdate,
GuildCreate(Box<GuildCreate>),
GuildDelete(Box<GuildDelete>),
GuildEmojisUpdate(GuildEmojisUpdate),
GuildIntegrationsUpdate(GuildIntegrationsUpdate),
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(ThreadCreate),
ThreadDelete(ThreadDelete),
ThreadListSync(ThreadListSync),
ThreadMemberUpdate(ThreadMemberUpdate),
ThreadMembersUpdate(ThreadMembersUpdate),
ThreadUpdate(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
BanAdd(BanAdd)
BanRemove(BanRemove)
ChannelCreate(ChannelCreate)
ChannelDelete(ChannelDelete)
ChannelPinsUpdate(ChannelPinsUpdate)
ChannelUpdate(ChannelUpdate)
GiftCodeUpdate
GuildCreate(Box<GuildCreate>)
GuildDelete(Box<GuildDelete>)
GuildEmojisUpdate(GuildEmojisUpdate)
GuildIntegrationsUpdate(GuildIntegrationsUpdate)
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(ThreadCreate)
ThreadDelete(ThreadDelete)
ThreadListSync(ThreadListSync)
ThreadMemberUpdate(ThreadMemberUpdate)
ThreadMembersUpdate(ThreadMembersUpdate)
ThreadUpdate(ThreadUpdate)
TypingStart(Box<TypingStart>)
UnavailableGuild(UnavailableGuild)
UserUpdate(UserUpdate)
VoiceServerUpdate(VoiceServerUpdate)
VoiceStateUpdate(Box<VoiceStateUpdate>)
WebhooksUpdate(WebhooksUpdate)
Implementations
sourceimpl DispatchEvent
impl DispatchEvent
Trait Implementations
sourceimpl Clone for DispatchEvent
impl Clone for DispatchEvent
sourcefn clone(&self) -> DispatchEvent
fn clone(&self) -> DispatchEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for DispatchEvent
impl Debug for DispatchEvent
sourceimpl PartialEq<DispatchEvent> for DispatchEvent
impl PartialEq<DispatchEvent> for DispatchEvent
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &DispatchEvent) -> bool
fn ne(&self, other: &DispatchEvent) -> bool
This method tests for !=.
sourceimpl Serialize for DispatchEvent
impl Serialize for DispatchEvent
sourceimpl TryFrom<Event> for DispatchEvent
impl TryFrom<Event> for DispatchEvent
impl Eq for DispatchEvent
impl StructuralEq 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more