pub enum ShardState {
Active,
Disconnected {
reconnect_attempts: u8,
},
FatallyClosed,
Identifying,
Resuming,
}
Expand description
Current state of a Shard.
Variants§
Active
Shard is connected to the gateway with an active session.
Disconnected
Shard is disconnected from the gateway but may reconnect in the future.
The websocket connection may still be open.
FatallyClosed
Shard has fatally closed.
Possible reasons may be due to failed authentication,
invalid intents, or other reasons. Refer to the documentation for
CloseCode
for possible reasons.
Identifying
Shard is waiting to establish or resume a session.
Resuming
Shard is replaying missed dispatch events.
The shard is considered identified whilst resuming.
Implementations§
Source§impl ShardState
impl ShardState
Sourcepub const fn is_identified(self) -> bool
pub const fn is_identified(self) -> bool
Trait Implementations§
Source§impl Clone for ShardState
impl Clone for ShardState
Source§fn clone(&self) -> ShardState
fn clone(&self) -> ShardState
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ShardState
impl Debug for ShardState
Source§impl PartialEq for ShardState
impl PartialEq for ShardState
impl Copy for ShardState
impl Eq for ShardState
impl StructuralPartialEq for ShardState
Auto Trait Implementations§
impl Freeze for ShardState
impl RefUnwindSafe for ShardState
impl Send for ShardState
impl Sync for ShardState
impl Unpin for ShardState
impl UnwindSafe for ShardState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.