blob: a967ab538fd28446fe717cf4ff9df7183b243f50 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
//! A collection of events created by the client, not a part of the Discord API
//! itself.
use super::ShardId;
use ::gateway::ConnectionStage;
#[derive(Clone, Debug)]
pub(crate) enum ClientEvent {
ShardStageUpdate(ShardStageUpdateEvent),
}
/// An event denoting that a shard's connection stage was changed.
///
/// # Examples
///
/// This might happen when a shard changes from [`ConnectionStage::Identifying`]
/// to [`ConnectionStage::Connected`].
///
/// [`ConnectionStage::Connected`]: ../../../../gateway/enum.ConnectionStage.html#variant.Connected
/// [`ConnectionStage::Identifying`]: ../../../../gateway/enum.ConnectionStage.html#variant.Identifying
#[derive(Clone, Debug)]
pub struct ShardStageUpdateEvent {
/// The new connection stage.
pub new: ConnectionStage,
/// The old connection stage.
pub old: ConnectionStage,
/// The ID of the shard that had its connection stage change.
pub shard_id: ShardId,
}
|