[−][src]Module twilight_gateway::shard
Types for working with and running connections to the gateway.
At the heart of the shard
module is the Shard
itself: it's the
interface used to start a shard, send messages to the gateway, and receive
Event
s from it, such as new messages or channel deletions.
Once running, the shard maintains [information about itself] that you can
obtain through it. This is information such as the latency or the current
Stage
of the connection, like whether it's Disconnected
or
Resuming
the connection.
Shards are configurable through the ShardConfigBuilder
struct, which
provides a clean interface for correctly building a ShardConfig
.
Re-exports
pub use self::config::ShardConfig; |
pub use self::error::Error; |
pub use self::error::Result; |
pub use self::stage::Stage; |
Modules
config | |
error | The error type of why errors occur in the shard module. |
event | Events that the shard emits to event streams. |
stage | Utilities for knowing and parsing the current connection stage of a
|
Structs
Information | Information about a shard, including its latency, current session sequence, and connection stage. |
Latency | Information about the latency of a |
ResumeSession | Holds the sessions id and sequence number to resume this shard's session with with |
Shard | |
ShardSink | A sink which tungstenite messages can be sunk into. ⚓ |