Enum twilight_model::gateway::event::Event [−][src]
pub enum Event {
Show variants
BanAdd(BanAdd),
BanRemove(BanRemove),
ChannelCreate(ChannelCreate),
ChannelDelete(ChannelDelete),
ChannelPinsUpdate(ChannelPinsUpdate),
ChannelUpdate(ChannelUpdate),
GatewayHeartbeat(u64),
GatewayHeartbeatAck,
GatewayHello(u64),
GatewayInvalidateSession(bool),
GatewayReconnect,
GiftCodeUpdate,
GuildCreate(Box<GuildCreate>),
GuildDelete(Box<GuildDelete>),
GuildEmojisUpdate(GuildEmojisUpdate),
GuildIntegrationsUpdate(GuildIntegrationsUpdate),
GuildUpdate(Box<GuildUpdate>),
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),
ShardConnected(Connected),
ShardConnecting(Connecting),
ShardDisconnected(Disconnected),
ShardIdentifying(Identifying),
ShardReconnecting(Reconnecting),
ShardPayload(Payload),
ShardResuming(Resuming),
TypingStart(Box<TypingStart>),
UnavailableGuild(UnavailableGuild),
UserUpdate(UserUpdate),
VoiceServerUpdate(VoiceServerUpdate),
VoiceStateUpdate(Box<VoiceStateUpdate>),
WebhooksUpdate(WebhooksUpdate),
}Expand description
Any type of event that a shard emits.
This brings together all of the types of DispatchEvents,
GatewayEvents, and ShardEvents.
Variants
BanAdd(BanAdd)Expand description
A user was banned from a guild.
BanRemove(BanRemove)Expand description
A user’s ban from a guild was removed.
ChannelCreate(ChannelCreate)Expand description
A channel was created.
ChannelDelete(ChannelDelete)Expand description
A channel was deleted.
ChannelPinsUpdate(ChannelPinsUpdate)Expand description
A channel’s pins were updated.
ChannelUpdate(ChannelUpdate)Expand description
A channel was updated.
GatewayHeartbeat(u64)Expand description
A heartbeat was sent to or received from the gateway.
Expand description
A heartbeat acknowledgement was received from the gateway.
GatewayHello(u64)Expand description
A “hello” packet was received from the gateway.
GatewayInvalidateSession(bool)Expand description
A shard’s session was invalidated.
true if resumeable. If not, then the shard must do a full reconnect.
Expand description
The gateway is indicating to perform a reconnect.
Expand description
Undocumented event, should be ignored
GuildCreate(Box<GuildCreate>)Expand description
A guild was created.
GuildDelete(Box<GuildDelete>)Expand description
A guild was deleted or the current user was removed from a guild.
GuildEmojisUpdate(GuildEmojisUpdate)Expand description
A guild’s emojis were updated.
GuildIntegrationsUpdate(GuildIntegrationsUpdate)Expand description
A guild’s integrations were updated.
GuildUpdate(Box<GuildUpdate>)Expand description
A guild was updated.
InviteCreate(Box<InviteCreate>)Expand description
A invite was made.
InviteDelete(InviteDelete)Expand description
A invite was deleted.
Expand description
A user was added to a guild.
MemberRemove(MemberRemove)Expand description
A user was removed from a guild.
MemberUpdate(Box<MemberUpdate>)Expand description
A user’s member object in a guild was updated.
MemberChunk(MemberChunk)Expand description
A chunk of members were received from the gateway.
MessageCreate(Box<MessageCreate>)Expand description
A message was created in a channel.
MessageDelete(MessageDelete)Expand description
A message was deleted in a channel.
MessageDeleteBulk(MessageDeleteBulk)Expand description
Multiple messages were deleted in a channel.
MessageUpdate(Box<MessageUpdate>)Expand description
A message was updated in a channel.
PresenceUpdate(Box<PresenceUpdate>)Expand description
A user’s active presence (such as game or online status) was updated.
Expand description
Multiple presences outside of a guild were updated.
For bots this is always empty and useless.
ReactionAdd(Box<ReactionAdd>)Expand description
A reaction was added to a message.
ReactionRemove(Box<ReactionRemove>)Expand description
A reaction was removed from a message.
ReactionRemoveAll(ReactionRemoveAll)Expand description
All reactions were removed from a message.
ReactionRemoveEmoji(ReactionRemoveEmoji)Expand description
All instances of a given emoji from the reactions of a message were removed.
Expand description
A shard is now “ready” and fully connected.
Expand description
A shard has successfully resumed.
RoleCreate(RoleCreate)Expand description
A role was created in a guild.
RoleDelete(RoleDelete)Expand description
A role was deleted in a guild.
RoleUpdate(RoleUpdate)Expand description
A role was updated in a guild.
ShardConnected(Connected)Expand description
A shard is now in a connected stage after being fully connected to the gateway.
ShardConnecting(Connecting)Expand description
A shard is now in a connecting stage after starting to connect to the gateway.
ShardDisconnected(Disconnected)Expand description
A shard is now in a disconnected stage after the connection was closed.
ShardIdentifying(Identifying)Expand description
A shard is now in a identifying stage after starting a new session.
ShardReconnecting(Reconnecting)Expand description
A shard is now in a reconnecting stage after a disconnect or session was ended.
ShardPayload(Payload)Expand description
A payload of bytes came in through the shard’s connection.
ShardResuming(Resuming)Expand description
A shard is now in a Resuming stage after a disconnect.
TypingStart(Box<TypingStart>)Expand description
A user started typing in a channel.
Expand description
A guild is now unavailable.
UserUpdate(UserUpdate)Expand description
The current user was updated.
VoiceServerUpdate(VoiceServerUpdate)Expand description
A voice server update was sent.
VoiceStateUpdate(Box<VoiceStateUpdate>)Expand description
A voice state in a voice channel was updated.
WebhooksUpdate(WebhooksUpdate)Expand description
A webhook was updated.
Implementations
Trait Implementations
impl From<Box<DispatchEvent, Global>> for Event[src]
impl From<Box<DispatchEvent, Global>> for Event[src]fn from(event: Box<DispatchEvent>) -> Self[src]
fn from(event: Box<DispatchEvent>) -> Self[src]Performs the conversion.
impl From<GatewayEvent> for Event[src]
impl From<GatewayEvent> for Event[src]fn from(event: GatewayEvent) -> Self[src]
fn from(event: GatewayEvent) -> Self[src]Performs the conversion.
impl From<ShardEvent> for Event[src]
impl From<ShardEvent> for Event[src]fn from(event: ShardEvent) -> Self[src]
fn from(event: ShardEvent) -> Self[src]Performs the conversion.
impl TryFrom<Event> for GatewayEvent[src]
impl TryFrom<Event> for GatewayEvent[src]impl TryFrom<Event> for ShardEvent[src]
impl TryFrom<Event> for ShardEvent[src]impl TryFrom<Event> for DispatchEvent[src]
impl TryFrom<Event> for DispatchEvent[src]impl Eq for Event[src]
impl StructuralEq for Event[src]
impl StructuralPartialEq for Event[src]
Auto Trait Implementations
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more