Add Debug derives to all structs

This commit is contained in:
bitfl0wer 2023-08-28 12:27:21 +02:00
parent 9224278cd5
commit 02212f95e3
6 changed files with 8 additions and 1 deletions

View File

@ -7,6 +7,7 @@ use crate::{
};
/// Useful metadata for working with [`types::Reaction`], bundled together nicely.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ReactionMeta {
pub message_id: types::Snowflake,
pub channel_id: types::Snowflake,

View File

@ -329,6 +329,7 @@ impl GatewayHandle {
}
}
#[derive(Debug)]
pub struct Gateway {
events: Arc<Mutex<Events>>,
heartbeat_handler: HeartbeatHandler,
@ -726,6 +727,7 @@ impl Gateway {
/// Handles sending heartbeats to the gateway in another thread
#[allow(dead_code)] // FIXME: Remove this, once HeartbeatHandler is used
#[derive(Debug)]
struct HeartbeatHandler {
/// How ofter heartbeats need to be sent at a minimum
pub heartbeat_interval: Duration,

View File

@ -16,6 +16,7 @@ use crate::{
/// Chorus' request struct. This struct is used to send rate-limited requests to the Spacebar server.
/// See <https://discord.com/developers/docs/topics/rate-limits#rate-limits> for more information.
#[derive(Debug)]
pub struct ChorusRequest {
pub request: RequestBuilder,
pub limit_type: LimitType,

View File

@ -124,7 +124,7 @@ pub struct MessageInteraction {
pub member: Option<Arc<RwLock<GuildMember>>>,
}
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize, Eq, PartialOrd, Ord)]
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize, Eq, PartialOrd, Ord)]
pub struct AllowedMention {
parse: Vec<AllowedMentionType>,
roles: Vec<Snowflake>,

View File

@ -24,6 +24,7 @@ pub enum InteractionType {
ApplicationCommand = 2,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum InteractionResponseType {
SelfCommandResponse = 0,
Pong = 1,
@ -33,6 +34,7 @@ pub enum InteractionResponseType {
AcknowledgeWithSource = 5,
}
#[derive(Debug, Default, Clone, PartialEq, Serialize, Deserialize)]
pub struct InteractionApplicationCommandCallbackData {
pub tts: bool,
pub content: String,

View File

@ -21,6 +21,7 @@ pub struct MessageSendSchema {
pub attachments: Option<Vec<PartialDiscordFileAttachment>>,
}
#[derive(Debug)]
pub enum MessageSearchEndpoint {
GuildChannel(Snowflake),
Channel(Snowflake),