[][src]Enum twilight_model::gateway::CloseCode

#[non_exhaustive]
#[repr(u16)]pub enum CloseCode {
    UnknownError,
    UnknownOpcode,
    DecodeError,
    NotAuthenticated,
    AuthenticationFailed,
    AlreadyAuthenticated,
    InvalidSequence,
    RateLimited,
    SessionTimedOut,
    InvalidShard,
    ShardingRequired,
    InvalidApiVersion,
    InvalidIntents,
    DisallowedIntents,
}

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.
UnknownError

An unknown error occurred.

UnknownOpcode

An invalid opcode or payload for an 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.

InvalidSequence

An invalid sequence was sent for resuming.

RateLimited

Too many payloads were sent in a certain amount of time.

SessionTimedOut

The session timed out.

InvalidShard

An invalid shard was sent when identifying.

ShardingRequired

Sharding is required because there are too many guilds.

InvalidApiVersion

An invalid version for the gateway was sent.

InvalidIntents

An invalid intent was sent.

DisallowedIntents

A disallowed intent was sent, may need allowlisting.

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.