[][src]Enum twilight_model::voice::CloseCode

#[non_exhaustive]
#[repr(u16)]pub enum CloseCode {
    UnknownOpcode,
    DecodeError,
    NotAuthenticated,
    AuthenticationFailed,
    AlreadyAuthenticated,
    SessionNoLongerValid,
    SessionTimedOut,
    ServerNotFound,
    UnknownProtocol,
    Disconnected,
    VoiceServerCrashed,
    UnknownEncryptionMode,
}

Voice gateway close event codes.

Variants (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 recognised.

Trait Implementations

impl Clone for CloseCode[src]

impl Copy for CloseCode[src]

impl Debug for CloseCode[src]

impl<'de> Deserialize<'de> for CloseCode[src]

impl Eq for CloseCode[src]

impl Hash for CloseCode[src]

impl Ord for CloseCode[src]

impl PartialEq<CloseCode> for CloseCode[src]

impl PartialOrd<CloseCode> for CloseCode[src]

impl Serialize for CloseCode[src]

impl StructuralEq for CloseCode[src]

impl StructuralPartialEq for CloseCode[src]

impl TryFrom<u16> for CloseCode[src]

type Error = CloseCodeConversionError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.