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
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
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
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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