#[non_exhaustive]pub struct Opcode(pub u8);Expand description
An enum representing the gateway opcodes.
Tuple Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.0: u8Implementations§
Source§impl Opcode
impl Opcode
Sourcepub const PresenceUpdate: Self
pub const PresenceUpdate: Self
Used to update the client status.
Sourcepub const VoiceStateUpdate: Self
pub const VoiceStateUpdate: Self
Used to join/move/leave voice channels.
Sourcepub const VoiceServerPing: Self
pub const VoiceServerPing: Self
Used for voice ping checking.
Sourcepub const RequestGuildMembers: Self
pub const RequestGuildMembers: Self
Used to request guild members.
Sourcepub const InvalidSession: Self
pub const InvalidSession: Self
Used to notify clients that they have an invalid session Id.
Sourcepub const HeartbeatAck: Self
pub const HeartbeatAck: Self
Sent immediately following a client heartbeat that was received.
Sourcepub const RequestSoundboardSounds: Self
pub const RequestSoundboardSounds: Self
Used to request soundboard sounds from a list of guilds.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Opcode
impl<'de> Deserialize<'de> for Opcode
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
Source§impl Ord for Opcode
impl Ord for Opcode
Source§impl PartialOrd for Opcode
impl PartialOrd for Opcode
impl Copy for Opcode
impl Eq for Opcode
impl StructuralPartialEq for Opcode
Auto Trait Implementations§
impl Freeze for Opcode
impl RefUnwindSafe for Opcode
impl Send for Opcode
impl Sync for Opcode
impl Unpin for Opcode
impl UnsafeUnpin for Opcode
impl UnwindSafe for Opcode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more