serenity 0.5.8

A Rust library for the Discord API.
Documentation
//! 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,
}