Enum twilight_model::gateway::CloseCode
source · [−]#[non_exhaustive]
#[repr(u16)]
pub enum CloseCode {
Show 14 variants
UnknownError,
UnknownOpcode,
DecodeError,
NotAuthenticated,
AuthenticationFailed,
AlreadyAuthenticated,
InvalidSequence,
RateLimited,
SessionTimedOut,
InvalidShard,
ShardingRequired,
InvalidApiVersion,
InvalidIntents,
DisallowedIntents,
}Expand description
Gateway close event codes.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
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
sourceimpl<'de> Deserialize<'de> for CloseCode
impl<'de> Deserialize<'de> for CloseCode
sourcefn 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
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more