diff --git a/README.md b/README.md index e33eb73..1eba046 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,6 @@ For api parameters, the same approach is used. The only difference for parameter For example, parameters for `leaveChat` method: ```rust -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] pub struct LeaveChatParams { chat_id: ChatId, } diff --git a/examples/api_trait_implementation.rs b/examples/api_trait_implementation.rs index a1a8c98..7383db5 100644 --- a/examples/api_trait_implementation.rs +++ b/examples/api_trait_implementation.rs @@ -7,7 +7,6 @@ use std::path::PathBuf; static TOKEN: &str = "TOKEN"; static BASE_API_URL: &str = "https://api.telegram.org/bot"; -#[derive(PartialEq, Debug)] pub struct Api { pub api_url: String, } @@ -18,7 +17,7 @@ pub enum Error { ApiError(ErrorResponse), } -#[derive(PartialEq, Debug)] +#[derive(Debug)] pub struct HttpError { pub code: u16, pub message: String, diff --git a/src/api.rs b/src/api.rs index ec94fa3..230807e 100644 --- a/src/api.rs +++ b/src/api.rs @@ -13,7 +13,7 @@ pub use telegram_api_impl::*; pub static BASE_API_URL: &str = "https://api.telegram.org/bot"; -#[derive(PartialEq, Debug, Serialize, Deserialize, thiserror::Error)] +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, thiserror::Error)] #[serde(untagged)] pub enum Error { #[error("{0}")] @@ -26,7 +26,7 @@ pub enum Error { EncodeError(String), } -#[derive(PartialEq, Debug, Serialize, Deserialize, thiserror::Error)] +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, thiserror::Error)] #[error("Http Error {code}: {message}")] pub struct HttpError { pub code: u16, diff --git a/src/api_params.rs b/src/api_params.rs index a588446..33aa43f 100644 --- a/src/api_params.rs +++ b/src/api_params.rs @@ -19,7 +19,7 @@ use serde::Serialize; use std::path::PathBuf; use typed_builder::TypedBuilder as Builder; -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(untagged)] pub enum File { InputFile(InputFile), @@ -91,7 +91,7 @@ pub enum InlineQueryResult { Voice(InlineQueryResultVoice), } -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(tag = "type")] pub enum InputMedia { #[serde(rename = "animation")] @@ -106,7 +106,7 @@ pub enum InputMedia { Video(InputMediaVideo), } -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(tag = "source")] pub enum PassportElementError { #[serde(rename = "data")] @@ -129,7 +129,7 @@ pub enum PassportElementError { Unspecified(PassportElementErrorUnspecified), } -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(untagged)] pub enum ChatId { Integer(i64), @@ -148,7 +148,7 @@ impl From for ChatId { } } -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(untagged)] pub enum ReplyMarkup { InlineKeyboardMarkup(InlineKeyboardMarkup), @@ -173,7 +173,7 @@ pub enum ChatAction { UploadVideoNote, } -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(tag = "type")] pub enum Media { #[serde(rename = "audio")] @@ -186,7 +186,7 @@ pub enum Media { Video(InputMediaVideo), } -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(tag = "type")] pub enum BotCommandScope { #[serde(rename = "default")] @@ -205,31 +205,31 @@ pub enum BotCommandScope { ChatMember(BotCommandScopeChatMember), } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotCommandScopeChat { #[builder(setter(into))] pub chat_id: ChatId, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotCommandScopeChatAdministrators { #[builder(setter(into))] pub chat_id: ChatId, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotCommandScopeChatMember { #[builder(setter(into))] pub chat_id: ChatId, pub user_id: u64, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputFile { pub path: PathBuf, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetUpdatesParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] @@ -248,7 +248,7 @@ pub struct GetUpdatesParams { pub allowed_updates: Option>, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetWebhookParams { #[builder(setter(into))] pub url: String, @@ -281,7 +281,7 @@ pub struct DeleteWebhookParams { pub drop_pending_updates: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendMessageParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -322,7 +322,7 @@ pub struct SendMessageParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ForwardMessageParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -341,7 +341,7 @@ pub struct ForwardMessageParams { pub message_id: i32, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CopyMessageParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -384,7 +384,7 @@ pub struct CopyMessageParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendPhotoParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -425,7 +425,7 @@ pub struct SendPhotoParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendAudioParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -482,7 +482,7 @@ pub struct SendAudioParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendDocumentParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -531,7 +531,7 @@ pub struct SendDocumentParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendVideoParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -592,7 +592,7 @@ pub struct SendVideoParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendAnimationParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -649,7 +649,7 @@ pub struct SendAnimationParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendVoiceParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -694,7 +694,7 @@ pub struct SendVoiceParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendVideoNoteParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -735,7 +735,7 @@ pub struct SendVideoNoteParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendMediaGroupParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -840,7 +840,7 @@ pub struct EditMessageLiveLocationParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct StopMessageLiveLocationParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] @@ -911,7 +911,7 @@ pub struct SendVenueParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendContactParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -951,7 +951,7 @@ pub struct SendContactParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendPollParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1022,7 +1022,7 @@ pub struct SendPollParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendDiceParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1052,7 +1052,7 @@ pub struct SendDiceParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendChatActionParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1073,13 +1073,13 @@ pub struct GetUserProfilePhotosParams { pub limit: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetFileParams { #[builder(setter(into))] pub file_id: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BanChatMemberParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1095,7 +1095,7 @@ pub struct BanChatMemberParams { pub revoke_messages: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnbanChatMemberParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1107,7 +1107,7 @@ pub struct UnbanChatMemberParams { pub only_if_banned: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct RestrictChatMemberParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1121,7 +1121,7 @@ pub struct RestrictChatMemberParams { pub until_date: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PromoteChatMemberParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1173,7 +1173,7 @@ pub struct PromoteChatMemberParams { pub can_pin_messages: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatAdministratorCustomTitleParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1184,7 +1184,7 @@ pub struct SetChatAdministratorCustomTitleParams { pub custom_title: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BanChatSenderChatParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1192,7 +1192,7 @@ pub struct BanChatSenderChatParams { pub sender_chat_id: i64, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnbanChatSenderChatParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1200,7 +1200,7 @@ pub struct UnbanChatSenderChatParams { pub sender_chat_id: i64, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatPermissionsParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1208,13 +1208,13 @@ pub struct SetChatPermissionsParams { pub permissions: ChatPermissions, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ExportChatInviteLinkParams { #[builder(setter(into))] pub chat_id: ChatId, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct CreateChatInviteLinkParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1236,7 +1236,7 @@ pub struct CreateChatInviteLinkParams { pub creates_join_request: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditChatInviteLinkParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1261,7 +1261,7 @@ pub struct EditChatInviteLinkParams { pub creates_join_request: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct RevokeChatInviteLinkParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1270,7 +1270,7 @@ pub struct RevokeChatInviteLinkParams { pub invite_link: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ApproveChatJoinRequestParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1278,7 +1278,7 @@ pub struct ApproveChatJoinRequestParams { pub user_id: u64, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeclineChatJoinRequestParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1286,7 +1286,7 @@ pub struct DeclineChatJoinRequestParams { pub user_id: u64, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatPhotoParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1294,13 +1294,13 @@ pub struct SetChatPhotoParams { pub photo: InputFile, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteChatPhotoParams { #[builder(setter(into))] pub chat_id: ChatId, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatTitleParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1309,7 +1309,7 @@ pub struct SetChatTitleParams { pub title: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatDescriptionParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1319,7 +1319,7 @@ pub struct SetChatDescriptionParams { pub description: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PinChatMessageParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1331,7 +1331,7 @@ pub struct PinChatMessageParams { pub disable_notification: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnpinChatMessageParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1341,37 +1341,37 @@ pub struct UnpinChatMessageParams { pub message_id: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UnpinAllChatMessagesParams { #[builder(setter(into))] pub chat_id: ChatId, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct LeaveChatParams { #[builder(setter(into))] pub chat_id: ChatId, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatParams { #[builder(setter(into))] pub chat_id: ChatId, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatAdministratorsParams { #[builder(setter(into))] pub chat_id: ChatId, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatMemberCountParams { #[builder(setter(into))] pub chat_id: ChatId, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatMemberParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1379,7 +1379,7 @@ pub struct GetChatMemberParams { pub user_id: u64, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatStickerSetParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1388,13 +1388,13 @@ pub struct SetChatStickerSetParams { pub sticker_set_name: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteChatStickerSetParams { #[builder(setter(into))] pub chat_id: ChatId, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct AnswerCallbackQueryParams { #[builder(setter(into))] pub callback_query_id: String, @@ -1416,7 +1416,7 @@ pub struct AnswerCallbackQueryParams { pub cache_time: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetMyCommandsParams { pub commands: Vec, @@ -1429,7 +1429,7 @@ pub struct SetMyCommandsParams { pub language_code: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetMyCommandsParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] @@ -1440,7 +1440,7 @@ pub struct GetMyCommandsParams { pub language_code: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteMyCommandsParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] @@ -1451,7 +1451,7 @@ pub struct DeleteMyCommandsParams { pub language_code: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditMessageTextParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] @@ -1485,7 +1485,7 @@ pub struct EditMessageTextParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditMessageCaptionParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] @@ -1516,7 +1516,7 @@ pub struct EditMessageCaptionParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditMessageMediaParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] @@ -1538,7 +1538,7 @@ pub struct EditMessageMediaParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EditMessageReplyMarkupParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] @@ -1557,7 +1557,7 @@ pub struct EditMessageReplyMarkupParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct StopPollParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1569,7 +1569,7 @@ pub struct StopPollParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteMessageParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1577,7 +1577,7 @@ pub struct DeleteMessageParams { pub message_id: i32, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendStickerParams { #[builder(setter(into))] pub chat_id: ChatId, @@ -1606,13 +1606,13 @@ pub struct SendStickerParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetStickerSetParams { #[builder(setter(into))] pub name: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UploadStickerFileParams { pub user_id: u64, @@ -1680,7 +1680,7 @@ pub struct AddStickerToSetParams { pub mask_position: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetStickerPositionInSetParams { #[builder(setter(into))] pub sticker: String, @@ -1688,13 +1688,13 @@ pub struct SetStickerPositionInSetParams { pub position: u32, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct DeleteStickerFromSetParams { #[builder(setter(into))] pub sticker: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetStickerSetThumbParams { #[builder(setter(into))] pub name: String, @@ -1734,7 +1734,7 @@ pub struct AnswerInlineQueryParams { pub switch_pm_parameter: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendInvoiceParams { pub chat_id: i64, @@ -1836,7 +1836,7 @@ pub struct SendInvoiceParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct AnswerShippingQueryParams { #[builder(setter(into))] pub shipping_query_id: String, @@ -1852,7 +1852,7 @@ pub struct AnswerShippingQueryParams { pub error_message: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct AnswerPreCheckoutQueryParams { #[builder(setter(into))] pub pre_checkout_query_id: String, @@ -1864,14 +1864,14 @@ pub struct AnswerPreCheckoutQueryParams { pub error_message: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetPassportDataErrorsParams { pub user_id: u64, pub errors: Vec, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SendGameParams { pub chat_id: i64, @@ -1899,7 +1899,7 @@ pub struct SendGameParams { pub reply_markup: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetGameScoreParams { pub user_id: u64, @@ -1926,7 +1926,7 @@ pub struct SetGameScoreParams { pub inline_message_id: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetGameHighScoresParams { pub user_id: u64, @@ -1943,7 +1943,7 @@ pub struct GetGameHighScoresParams { pub inline_message_id: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaPhoto { #[builder(setter(into))] pub media: File, @@ -1961,7 +1961,7 @@ pub struct InputMediaPhoto { pub caption_entities: Option>, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaVideo { #[builder(setter(into))] pub media: File, @@ -1999,7 +1999,7 @@ pub struct InputMediaVideo { pub supports_streaming: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaAnimation { #[builder(setter(into))] pub media: File, @@ -2033,7 +2033,7 @@ pub struct InputMediaAnimation { pub duration: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaAudio { #[builder(setter(into))] pub media: File, @@ -2067,7 +2067,7 @@ pub struct InputMediaAudio { pub title: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputMediaDocument { #[builder(setter(into))] pub media: File, @@ -2093,7 +2093,7 @@ pub struct InputMediaDocument { pub disable_content_type_detection: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetMyDefaultAdministratorRightsParams { pub rights: ChatAdministratorRights, @@ -2102,7 +2102,7 @@ pub struct SetMyDefaultAdministratorRightsParams { pub for_channels: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetMyDefaultAdministratorRightsParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] @@ -2116,7 +2116,7 @@ pub struct AnswerWebAppQueryParams { pub result: InlineQueryResult, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SetChatMenuButtonParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] @@ -2127,7 +2127,7 @@ pub struct SetChatMenuButtonParams { pub menu_button: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GetChatMenuButtonParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] diff --git a/src/api_traits.rs b/src/api_traits.rs index ff72f7d..eaeffa7 100644 --- a/src/api_traits.rs +++ b/src/api_traits.rs @@ -13,7 +13,7 @@ pub use async_telegram_api::*; #[cfg(feature = "telegram-trait")] pub use telegram_api::*; -#[derive(PartialEq, Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct MethodResponse { /// Always true pub ok: bool, @@ -22,7 +22,7 @@ pub struct MethodResponse { pub description: Option, } -#[derive(PartialEq, Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)] /// \[…\] an unsuccessful request, `ok` equals false and the error is explained in the `description`. /// An Integer `error_code` field is also returned, but its contents are subject to change in the future. /// Some errors may also have an optional field `parameters` of the type `ResponseParameters`, which can help to automatically handle the error. @@ -38,7 +38,7 @@ pub struct ErrorResponse { pub parameters: Option, } -#[derive(PartialEq, Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize, PartialEq)] #[serde(untagged)] pub enum EditMessageResponse { Message(MethodResponse), diff --git a/src/objects.rs b/src/objects.rs index 7b1d656..0302de1 100644 --- a/src/objects.rs +++ b/src/objects.rs @@ -13,7 +13,7 @@ pub enum InputMessageContent { Invoice(InputInvoiceMessageContent), } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] #[serde(tag = "status")] pub enum ChatMember { #[serde(rename = "creator")] @@ -145,7 +145,7 @@ pub enum PassportElementErrorTranslationFileType { TemporaryRegistration, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] #[serde(tag = "type")] pub enum MenuButton { #[serde(rename = "commands")] @@ -164,7 +164,7 @@ pub struct MenuButtonWebApp { pub web_app: WebAppInfo, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatMemberOwner { pub user: User, @@ -175,7 +175,7 @@ pub struct ChatMemberOwner { pub is_anonymous: bool, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatMemberAdministrator { pub user: User, @@ -214,12 +214,12 @@ pub struct ChatMemberAdministrator { pub can_pin_messages: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatMemberMember { pub user: User, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatMemberRestricted { pub user: User, @@ -246,11 +246,11 @@ pub struct ChatMemberRestricted { pub until_date: u64, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatMemberLeft { pub user: User, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatMemberBanned { pub user: User, @@ -299,7 +299,7 @@ pub enum UpdateContent { ChatJoinRequest(ChatJoinRequest), } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct WebhookInfo { #[builder(setter(into))] pub url: String, @@ -356,7 +356,7 @@ pub enum AllowedUpdate { ChatJoinRequest, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct User { pub id: u64, @@ -709,7 +709,7 @@ pub struct MessageId { pub message_id: i32, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct MessageEntity { #[serde(rename = "type")] pub type_field: MessageEntityType, @@ -731,7 +731,7 @@ pub struct MessageEntity { pub language: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PhotoSize { #[builder(setter(into))] pub file_id: String, @@ -748,7 +748,7 @@ pub struct PhotoSize { pub file_size: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Animation { #[builder(setter(into))] pub file_id: String, @@ -779,7 +779,7 @@ pub struct Animation { pub file_size: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Audio { #[builder(setter(into))] pub file_id: String, @@ -814,7 +814,7 @@ pub struct Audio { pub thumb: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Document { #[builder(setter(into))] pub file_id: String, @@ -839,7 +839,7 @@ pub struct Document { pub file_size: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Video { #[builder(setter(into))] pub file_id: String, @@ -870,7 +870,7 @@ pub struct Video { pub file_size: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct VideoNote { #[builder(setter(into))] pub file_id: String, @@ -891,7 +891,7 @@ pub struct VideoNote { pub file_size: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Voice { #[builder(setter(into))] pub file_id: String, @@ -910,7 +910,7 @@ pub struct Voice { pub file_size: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Contact { #[builder(setter(into))] pub phone_number: String, @@ -931,7 +931,7 @@ pub struct Contact { pub vcard: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Dice { #[builder(setter(into))] pub emoji: String, @@ -939,7 +939,7 @@ pub struct Dice { pub value: u8, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PollOption { #[builder(setter(into))] pub text: String, @@ -947,7 +947,7 @@ pub struct PollOption { pub voter_count: u32, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PollAnswer { #[builder(setter(into))] pub poll_id: String, @@ -957,7 +957,7 @@ pub struct PollAnswer { pub option_ids: Vec, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Poll { #[builder(setter(into))] pub id: String, @@ -1048,7 +1048,7 @@ pub struct Venue { pub google_place_type: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ProximityAlertTriggered { pub traveler: User, @@ -1067,21 +1067,21 @@ pub struct VideoChatEnded { pub duration: u32, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct VideoChatParticipantsInvited { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] pub users: Option>, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct UserProfilePhotos { pub total_count: u32, pub photos: Vec>, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct File { #[builder(setter(into))] pub file_id: String, @@ -1098,7 +1098,7 @@ pub struct File { pub file_path: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ReplyKeyboardMarkup { pub keyboard: Vec>, @@ -1119,7 +1119,7 @@ pub struct ReplyKeyboardMarkup { pub selective: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct KeyboardButton { #[builder(setter(into))] pub text: String, @@ -1158,12 +1158,12 @@ pub struct ReplyKeyboardRemove { pub selective: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InlineKeyboardMarkup { pub inline_keyboard: Vec>, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InlineKeyboardButton { #[builder(setter(into))] pub text: String, @@ -1201,7 +1201,7 @@ pub struct InlineKeyboardButton { pub pay: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct LoginUrl { #[builder(setter(into))] pub url: String, @@ -1246,7 +1246,7 @@ pub struct CallbackQuery { pub game_short_name: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ForceReply { pub force_reply: bool, @@ -1259,7 +1259,7 @@ pub struct ForceReply { pub selective: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatPhoto { #[builder(setter(into))] pub small_file_id: String, @@ -1274,7 +1274,7 @@ pub struct ChatPhoto { pub big_file_unique_id: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ChatInviteLink { #[builder(setter(into))] pub invite_link: String, @@ -1381,7 +1381,7 @@ pub struct ChatLocation { pub address: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct BotCommand { #[builder(setter(into))] pub command: String, @@ -2006,7 +2006,7 @@ pub struct InlineQueryResultContact { pub thumb_height: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InlineQueryResultGame { #[builder(setter(into))] pub id: String, @@ -2272,7 +2272,7 @@ pub struct InlineQueryResultCachedAudio { pub input_message_content: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputTextMessageContent { #[builder(setter(into))] pub message_text: String, @@ -2313,7 +2313,7 @@ pub struct InputLocationMessageContent { pub proximity_alert_radius: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputInvoiceMessageContent { #[builder(setter(into))] pub title: String, @@ -2418,7 +2418,7 @@ pub struct InputVenueMessageContent { pub google_place_type: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct InputContactMessageContent { #[builder(setter(into))] pub phone_number: String, @@ -2454,7 +2454,7 @@ pub struct ChosenInlineResult { pub query: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct LabeledPrice { #[builder(setter(into))] pub label: String, @@ -2462,7 +2462,7 @@ pub struct LabeledPrice { pub amount: u32, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Invoice { #[builder(setter(into))] pub title: String, @@ -2479,7 +2479,7 @@ pub struct Invoice { pub total_amount: u32, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ShippingAddress { #[builder(setter(into))] pub country_code: String, @@ -2500,7 +2500,7 @@ pub struct ShippingAddress { pub post_code: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct OrderInfo { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] @@ -2519,7 +2519,7 @@ pub struct OrderInfo { pub shipping_address: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ShippingOption { #[builder(setter(into))] pub id: String, @@ -2530,7 +2530,7 @@ pub struct ShippingOption { pub prices: Vec, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct SuccessfulPayment { #[builder(setter(into))] pub currency: String, @@ -2555,7 +2555,7 @@ pub struct SuccessfulPayment { pub provider_payment_charge_id: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct ShippingQuery { #[builder(setter(into))] pub id: String, @@ -2568,7 +2568,7 @@ pub struct ShippingQuery { pub shipping_address: ShippingAddress, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PreCheckoutQuery { #[builder(setter(into))] pub id: String, @@ -2592,14 +2592,14 @@ pub struct PreCheckoutQuery { pub order_info: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportData { pub data: Vec, pub credentials: EncryptedCredentials, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportFile { #[builder(setter(into))] pub file_id: String, @@ -2612,7 +2612,7 @@ pub struct PassportFile { pub file_date: u64, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EncryptedPassportElement { #[serde(rename = "type")] pub type_field: EncryptedPassportElementType, @@ -2653,7 +2653,7 @@ pub struct EncryptedPassportElement { pub hash: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct EncryptedCredentials { #[builder(setter(into))] pub data: String, @@ -2665,7 +2665,7 @@ pub struct EncryptedCredentials { pub secret: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorDataField { #[serde(rename = "type")] pub type_field: PassportElementErrorDataFieldType, @@ -2680,7 +2680,7 @@ pub struct PassportElementErrorDataField { pub message: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorFrontSide { #[serde(rename = "type")] pub type_field: PassportElementErrorFrontSideType, @@ -2692,7 +2692,7 @@ pub struct PassportElementErrorFrontSide { pub message: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorReverseSide { #[serde(rename = "type")] pub type_field: PassportElementErrorReverseSideType, @@ -2704,7 +2704,7 @@ pub struct PassportElementErrorReverseSide { pub message: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorSelfie { #[serde(rename = "type")] pub type_field: PassportElementErrorSelfieType, @@ -2716,7 +2716,7 @@ pub struct PassportElementErrorSelfie { pub message: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorFile { #[serde(rename = "type")] pub type_field: PassportElementErrorFileType, @@ -2728,7 +2728,7 @@ pub struct PassportElementErrorFile { pub message: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorFiles { #[serde(rename = "type")] pub type_field: PassportElementErrorFileType, @@ -2739,7 +2739,7 @@ pub struct PassportElementErrorFiles { pub message: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorTranslationFile { #[serde(rename = "type")] pub type_field: PassportElementErrorTranslationFileType, @@ -2751,7 +2751,7 @@ pub struct PassportElementErrorTranslationFile { pub message: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorTranslationFiles { #[serde(rename = "type")] pub type_field: PassportElementErrorTranslationFileType, @@ -2762,7 +2762,7 @@ pub struct PassportElementErrorTranslationFiles { pub message: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct PassportElementErrorUnspecified { #[serde(rename = "type")] pub type_field: EncryptedPassportElementType, @@ -2774,7 +2774,7 @@ pub struct PassportElementErrorUnspecified { pub message: String, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct Game { #[builder(setter(into))] pub title: String, @@ -2797,7 +2797,7 @@ pub struct Game { pub animation: Option, } -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Builder)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)] pub struct GameHighScore { pub position: u32,