Enum twilight_model::gateway::CloseCode [−][src]
#[non_exhaustive]
#[repr(u16)]
pub enum CloseCode {
Show 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
Expand description
An unknown error occurred.
Expand description
An invalid opcode or payload for an opcode was sent.
Expand description
An invalid payload was sent.
Expand description
A payload was sent prior to identifying.
Expand description
An invalid token was sent when identifying.
Expand description
Multiple identify payloads were sent.
Expand description
An invalid sequence was sent for resuming.
Expand description
Too many payloads were sent in a certain amount of time.
Expand description
The session timed out.
Expand description
An invalid shard was sent when identifying.
Expand description
Sharding is required because there are too many guilds.
Expand description
An invalid version for the gateway was sent.
Expand description
An invalid intent was sent.
Expand description
A disallowed intent was sent, may need allowlisting.
Trait Implementations
impl<'de> Deserialize<'de> for CloseCode[src]
impl<'de> Deserialize<'de> for CloseCode[src]fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, [src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
impl Ord for CloseCode[src]
impl Ord for CloseCode[src]impl PartialOrd<CloseCode> for CloseCode[src]
impl PartialOrd<CloseCode> for CloseCode[src]fn partial_cmp(&self, other: &CloseCode) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &CloseCode) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for CloseCode[src]
impl Eq for CloseCode[src]
impl StructuralEq for CloseCode[src]
impl StructuralPartialEq for CloseCode[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,