serenity/gateway/bridge/event.rs
1//! A collection of events created by the client, not a part of the Discord API itself.
2
3use crate::gateway::ConnectionStage;
4use crate::model::id::ShardId;
5
6/// An event denoting that a shard's connection stage was changed.
7///
8/// # Examples
9///
10/// This might happen when a shard changes from [`ConnectionStage::Identifying`] to
11/// [`ConnectionStage::Connected`].
12#[derive(Clone, Debug)]
13pub struct ShardStageUpdateEvent {
14 /// The new connection stage.
15 pub new: ConnectionStage,
16 /// The old connection stage.
17 pub old: ConnectionStage,
18 /// The ID of the shard that had its connection stage change.
19 pub shard_id: ShardId,
20}