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
source§impl PartialEq<CloseCode> for CloseCode
impl PartialEq<CloseCode> for CloseCode
impl Copy for CloseCode
impl Eq for CloseCode
impl StructuralEq for CloseCode
impl StructuralPartialEq for CloseCode
Auto Trait Implementations§
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