#[repr(u8)]pub enum Opcodes {
Dispatch = 0,
Heartbeat = 1,
Identify = 2,
StatusUpdate = 3,
VoiceStatusUpdate = 4,
Resume = 6,
Reconnect = 7,
RequestGuildMembers = 8,
InvalidSession = 9,
Hello = 10,
HeartbeatAck = 11,
}Expand description
A set of possible Discord gateway opcodes.
Variants§
Dispatch = 0
Dispatches a gateway event.
Heartbeat = 1
Used for sending ping and heartbeats.
Identify = 2
Used for obtaining a client handshake.
StatusUpdate = 3
Used to update the shard’s status.
VoiceStatusUpdate = 4
Used to join and leave voice channels.
Resume = 6
Used to resume a closed connection.
Reconnect = 7
Tells clients to reconnect to the gateway.
RequestGuildMembers = 8
used to request guild members.
InvalidSession = 9
Used to notify the client of an invlaid session.
Hello = 10
Sent immediately after connecting, contains heartbeat information.
HeartbeatAck = 11
Sent immediately after receiving a heartbeat.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Opcodes
impl<'de> Deserialize<'de> for Opcodes
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 Opcodes
impl RefUnwindSafe for Opcodes
impl Send for Opcodes
impl Sync for Opcodes
impl Unpin for Opcodes
impl UnwindSafe for Opcodes
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