#[non_exhaustive]pub enum ShardState {
Disconnected,
Identifying,
Resuming,
Active,
FatallyClosed(CloseCode),
Closed,
}Expand description
The connection state of a Shard.
discord.js counterpart: WebSocketShardStatus (@discordjs/ws).
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.
Disconnected
Not connected. The next call to Shard::next_event connects (after a backoff delay if
the previous attempt failed).
Identifying
Connected and identifying; waiting for READY.
Resuming
Connected and resuming; waiting for RESUMED.
Active
The session is established and events are flowing.
FatallyClosed(CloseCode)
Discord closed the connection with a code that forbids reconnecting.
Closed
Closed by Shard::close.
Trait Implementations§
Source§impl Clone for ShardState
impl Clone for ShardState
impl Copy for ShardState
Source§impl Debug for ShardState
impl Debug for ShardState
impl Eq for ShardState
Source§impl PartialEq for ShardState
impl PartialEq 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 UnsafeUnpin 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