#[non_exhaustive]#[repr(u16)]pub enum CloseCode {
UnknownOpcode = 4_001,
DecodeError = 4_002,
NotAuthenticated = 4_003,
AuthenticationFailed = 4_004,
AlreadyAuthenticated = 4_005,
SessionNoLongerValid = 4_006,
SessionTimedOut = 4_009,
ServerNotFound = 4_011,
UnknownProtocol = 4_012,
Disconnected = 4_014,
VoiceServerCrashed = 4_015,
UnknownEncryptionMode = 4_016,
}
Expand description
Voice gateway close event codes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownOpcode = 4_001
An invalid opcode was sent.
DecodeError = 4_002
An invalid payload was sent.
NotAuthenticated = 4_003
A payload was sent prior to identifying.
AuthenticationFailed = 4_004
An invalid token was sent when identifying.
AlreadyAuthenticated = 4_005
Multiple identify payloads were sent.
SessionNoLongerValid = 4_006
The session was invalidated.
SessionTimedOut = 4_009
The session timed out.
ServerNotFound = 4_011
The specified voice server was not found.
UnknownProtocol = 4_012
An unknown protocol was sent.
Disconnected = 4_014
Disconnected from the voice channel.
VoiceServerCrashed = 4_015
The voice server crashed.
UnknownEncryptionMode = 4_016
The encryption could not be recognized.
Trait Implementations§
source§impl<'de> Deserialize<'de> for CloseCode
impl<'de> Deserialize<'de> for CloseCode
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
impl Copy for CloseCode
impl Eq for CloseCode
impl StructuralPartialEq for CloseCode
Auto Trait Implementations§
impl Freeze for CloseCode
impl RefUnwindSafe for CloseCode
impl Send for CloseCode
impl Sync for CloseCode
impl Unpin for CloseCode
impl UnwindSafe for CloseCode
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)