Enum twilight_model::voice::CloseCode
source · #[non_exhaustive]
#[repr(u16)]
pub enum CloseCode {
UnknownOpcode,
DecodeError,
NotAuthenticated,
AuthenticationFailed,
AlreadyAuthenticated,
SessionNoLongerValid,
SessionTimedOut,
ServerNotFound,
UnknownProtocol,
Disconnected,
VoiceServerCrashed,
UnknownEncryptionMode,
}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
An invalid opcode was sent.
DecodeError
An invalid payload was sent.
NotAuthenticated
A payload was sent prior to identifying.
AuthenticationFailed
An invalid token was sent when identifying.
AlreadyAuthenticated
Multiple identify payloads were sent.
SessionNoLongerValid
The session was invalidated.
SessionTimedOut
The session timed out.
ServerNotFound
The specified voice server was not found.
UnknownProtocol
An unknown protocol was sent.
Disconnected
Disconnected from the voice channel.
VoiceServerCrashed
The voice server crashed.
UnknownEncryptionMode
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