diff --git a/src/core/types/message.rs b/src/core/types/message.rs index 48e667be..76406b4f 100644 --- a/src/core/types/message.rs +++ b/src/core/types/message.rs @@ -4,7 +4,7 @@ use crate::core::types::{ SuccessfulPayment, User, Venue, Video, VideoNote, Voice, }; -#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Clone, Serialize)] +#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] pub struct Message { #[serde(rename = "message_id")] pub id: i64, @@ -14,7 +14,7 @@ pub struct Message { pub message_kind: MessageKind, } -#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Clone, Serialize)] +#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] #[serde(untagged)] pub enum MessageKind { IncomingMessage { @@ -72,7 +72,7 @@ pub enum MessageKind { }, } -#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Clone, Serialize)] +#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] pub enum Sender { /// If message is sent from Chat #[serde(rename = "from")] @@ -82,7 +82,7 @@ pub enum Sender { Signature(String), } -#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Clone, Serialize)] +#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] #[serde(untagged)] pub enum ForwardKind { ChannelForward { @@ -106,7 +106,7 @@ pub enum ForwardKind { }, } -#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Clone, Serialize)] +#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] pub enum ForwardedFrom { #[serde(rename = "forward_from")] User(User), @@ -114,7 +114,7 @@ pub enum ForwardedFrom { SenderName(String), } -#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Clone, Serialize)] +#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] #[serde(untagged)] pub enum MediaKind { Animation { diff --git a/src/core/types/mod.rs b/src/core/types/mod.rs index e1d3921c..06e855e7 100644 --- a/src/core/types/mod.rs +++ b/src/core/types/mod.rs @@ -19,6 +19,7 @@ pub use self::{ order_info::OrderInfo, parse_mode::ParseMode, photo_size::PhotoSize, + poll::{Poll, PollOption}, pre_checkout_query::PreCheckoutQuery, response_parameters::ResponseParameters, send_invoice::SendInvoice, @@ -60,6 +61,7 @@ mod not_implemented_types; mod order_info; mod parse_mode; mod photo_size; +mod poll; mod pre_checkout_query; mod response_parameters; mod reply_markup;