mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-13 11:18:17 +01:00
remove all #[non_exhaustive]
s
This commit is contained in:
parent
0a397d8900
commit
fd64e17f4c
89 changed files with 0 additions and 181 deletions
|
@ -2,7 +2,6 @@ use serde::{Deserialize, Serialize};
|
|||
|
||||
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum AllowedUpdate {
|
||||
Message,
|
||||
EditedMessage,
|
||||
|
|
|
@ -8,7 +8,6 @@ use crate::types::{MimeWrapper, PhotoSize};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#animation).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Animation {
|
||||
/// An identifier for this file.
|
||||
pub file_id: String,
|
||||
|
|
|
@ -8,7 +8,6 @@ use crate::types::{MimeWrapper, PhotoSize};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#audio).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Audio {
|
||||
/// An identifier for this file.
|
||||
pub file_id: String,
|
||||
|
|
|
@ -4,7 +4,6 @@ use serde::{Deserialize, Serialize};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#botcommand).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct BotCommand {
|
||||
/// Text of the command, 1-32 characters.
|
||||
///
|
||||
|
|
|
@ -9,5 +9,4 @@ use serde::{Deserialize, Serialize};
|
|||
///
|
||||
/// [@Botfather]: https://t.me/botfather
|
||||
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct CallbackGame;
|
||||
|
|
|
@ -17,7 +17,6 @@ use crate::types::{Message, User};
|
|||
/// [inline mode]: https://core.telegram.org/bots/api#inline-mode
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct CallbackQuery {
|
||||
/// An unique identifier for this query.
|
||||
pub id: String,
|
||||
|
|
|
@ -7,7 +7,6 @@ use crate::types::{ChatPermissions, ChatPhoto, Message};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#chat).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Chat {
|
||||
/// A unique identifier for this chat. This number may be greater than 32
|
||||
/// bits and some programming languages may have difficulty/silent defects
|
||||
|
@ -49,7 +48,6 @@ impl Chat {
|
|||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
#[non_exhaustive]
|
||||
pub enum ChatKind {
|
||||
Public(ChatPublic),
|
||||
Private(ChatPrivate),
|
||||
|
@ -57,7 +55,6 @@ pub enum ChatKind {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ChatPublic {
|
||||
/// A title, for supergroups, channels and group chats.
|
||||
pub title: Option<String>,
|
||||
|
@ -127,7 +124,6 @@ impl ChatPublic {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ChatPrivate {
|
||||
/// A dummy field. Used to ensure that the `type` field is equal to
|
||||
/// `private`.
|
||||
|
@ -180,7 +176,6 @@ impl ChatPrivate {
|
|||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[serde(tag = "type")]
|
||||
#[non_exhaustive]
|
||||
pub enum PublicChatKind {
|
||||
Channel(PublicChatChannel),
|
||||
Group(PublicChatGroup),
|
||||
|
@ -189,7 +184,6 @@ pub enum PublicChatKind {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Default, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PublicChatChannel {
|
||||
/// A username, for private chats, supergroups and channels if available.
|
||||
pub username: Option<String>,
|
||||
|
@ -203,7 +197,6 @@ impl PublicChatChannel {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Default, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PublicChatGroup {
|
||||
/// A default chat member permissions, for groups and supergroups. Returned
|
||||
/// only from [`Bot::get_chat`].
|
||||
|
@ -220,7 +213,6 @@ impl PublicChatGroup {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Default, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PublicChatSupergroup {
|
||||
/// A username, for private chats, supergroups and channels if
|
||||
/// available.
|
||||
|
|
|
@ -2,7 +2,6 @@ use serde::{Deserialize, Serialize};
|
|||
|
||||
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum ChatAction {
|
||||
Typing,
|
||||
UploadPhoto,
|
||||
|
|
|
@ -5,7 +5,6 @@ use serde::{Deserialize, Serialize};
|
|||
/// (in the format `@channelusername`).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize, Display, From)]
|
||||
#[serde(untagged)]
|
||||
#[non_exhaustive]
|
||||
pub enum ChatId {
|
||||
/// A chat identifier.
|
||||
#[display(fmt = "{}", _0)]
|
||||
|
|
|
@ -7,7 +7,6 @@ use crate::types::User;
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#chatmember).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ChatMember {
|
||||
/// Information about the user.
|
||||
pub user: User,
|
||||
|
|
|
@ -6,7 +6,6 @@ use serde::{Deserialize, Serialize};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#chatpermissions).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Copy, Clone, Default, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ChatPermissions {
|
||||
/// `true`, if the user is allowed to send text messages, contacts,
|
||||
/// locations and venues.
|
||||
|
|
|
@ -4,7 +4,6 @@ use serde::{Deserialize, Serialize};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#chatphoto).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ChatPhoto {
|
||||
/// A file identifier of small (160x160) chat photo. This file_id can be
|
||||
/// used only for photo download and only for as long as the photo is
|
||||
|
|
|
@ -10,7 +10,6 @@ use crate::types::{Location, User};
|
|||
/// [result]: https://core.telegram.org/bots/api#inlinequeryresult
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ChosenInlineResult {
|
||||
/// The unique identifier for the result that was chosen.
|
||||
pub result_id: String,
|
||||
|
|
|
@ -5,7 +5,6 @@ use serde::{Deserialize, Serialize};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#contact).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Contact {
|
||||
/// A contact's phone number.
|
||||
pub phone_number: String,
|
||||
|
|
|
@ -5,7 +5,6 @@ use crate::types::DiceEmoji;
|
|||
/// This object represents an animated emoji that displays a random value.
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Dice {
|
||||
/// Emoji on which the dice throw animation is based.
|
||||
emoji: DiceEmoji,
|
||||
|
|
|
@ -12,7 +12,6 @@ use crate::types::{MimeWrapper, PhotoSize};
|
|||
/// [audio files]: https://core.telegram.org/bots/api#audio
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Document {
|
||||
/// An identifier for this file.
|
||||
pub file_id: String,
|
||||
|
|
|
@ -13,7 +13,6 @@ use serde::{Deserialize, Serialize};
|
|||
/// [Telegram Passport Documentation]: https://core.telegram.org/passport#receiving-information
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedCredentials {
|
||||
/// Base64-encoded encrypted JSON-serialized data with unique user's
|
||||
/// payload, data hashes and secrets required for
|
||||
|
|
|
@ -7,7 +7,6 @@ use super::PassportFile;
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#encryptedpassportelement).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElement {
|
||||
/// Base64-encoded element hash for using in
|
||||
/// [`PassportElementErrorKind::Unspecified`].
|
||||
|
@ -45,7 +44,6 @@ impl EncryptedPassportElement {
|
|||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
#[non_exhaustive]
|
||||
pub enum EncryptedPassportElementKind {
|
||||
PersonalDetails(EncryptedPassportElementPersonalDetails),
|
||||
Passport(EncryptedPassportElementPassport),
|
||||
|
@ -64,7 +62,6 @@ pub enum EncryptedPassportElementKind {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElementPersonalDetails {
|
||||
/// Base64-encoded encrypted Telegram Passport element data provided
|
||||
/// by the user, available for `personal_details`, `passport`,
|
||||
|
@ -96,7 +93,6 @@ impl EncryptedPassportElementPersonalDetails {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElementPassport {
|
||||
/// Base64-encoded encrypted Telegram Passport element data provided
|
||||
/// by the user, available for `personal_details`, `passport`,
|
||||
|
@ -176,7 +172,6 @@ impl EncryptedPassportElementPassport {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElementDriverLicense {
|
||||
/// Base64-encoded encrypted Telegram Passport element data provided
|
||||
/// by the user, available for `personal_details`, `passport`,
|
||||
|
@ -274,7 +269,6 @@ impl EncryptedPassportElementDriverLicense {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElementIdentityCard {
|
||||
/// Base64-encoded encrypted Telegram Passport element data provided
|
||||
/// by the user, available for `personal_details`, `passport`,
|
||||
|
@ -372,7 +366,6 @@ impl EncryptedPassportElementIdentityCard {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElementInternalPassport {
|
||||
/// Base64-encoded encrypted Telegram Passport element data provided
|
||||
/// by the user, available for `personal_details`, `passport`,
|
||||
|
@ -452,7 +445,6 @@ impl EncryptedPassportElementInternalPassport {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElementAddress {
|
||||
/// Base64-encoded encrypted Telegram Passport element data provided
|
||||
/// by the user, available for `personal_details`, `passport`,
|
||||
|
@ -484,7 +476,6 @@ impl EncryptedPassportElementAddress {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElementUtilityBill {
|
||||
/// Array of encrypted files with documents provided by the user,
|
||||
/// available for `utility_bill`, `bank_statement`, `rental_agreement`,
|
||||
|
@ -536,7 +527,6 @@ impl EncryptedPassportElementUtilityBill {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElementBankStatement {
|
||||
/// Array of encrypted files with documents provided by the user,
|
||||
/// available for `utility_bill`, `bank_statement`, `rental_agreement`,
|
||||
|
@ -588,7 +578,6 @@ impl EncryptedPassportElementBankStatement {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElementRentalAgreement {
|
||||
/// Array of encrypted files with documents provided by the user,
|
||||
/// available for `utility_bill`, `bank_statement`, `rental_agreement`,
|
||||
|
@ -640,7 +629,6 @@ impl EncryptedPassportElementRentalAgreement {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElementPassportRegistration {
|
||||
/// Array of encrypted files with documents provided by the user,
|
||||
/// available for `utility_bill`, `bank_statement`, `rental_agreement`,
|
||||
|
@ -692,7 +680,6 @@ impl EncryptedPassportElementPassportRegistration {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElementTemporaryRegistration {
|
||||
/// Array of encrypted files with documents provided by the user,
|
||||
/// available for `utility_bill`, `bank_statement`, `rental_agreement`,
|
||||
|
@ -744,7 +731,6 @@ impl EncryptedPassportElementTemporaryRegistration {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElementPhoneNumber {
|
||||
/// User's verified phone number, available only for `phone_number`
|
||||
/// type.
|
||||
|
@ -770,7 +756,6 @@ impl EncryptedPassportElementPhoneNumber {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct EncryptedPassportElementEmail {
|
||||
/// User's verified email address, available only for `email` type.
|
||||
pub email: String,
|
||||
|
|
|
@ -10,7 +10,6 @@ use serde::{Deserialize, Serialize};
|
|||
///
|
||||
/// [`Bot::get_file`]: crate::Bot::get_file
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct File {
|
||||
/// Identifier for this file.
|
||||
pub file_id: String,
|
||||
|
|
|
@ -14,7 +14,6 @@ use crate::types::True;
|
|||
/// [privacy mode]: https://core.telegram.org/bots#privacy-mode
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Copy, Clone, Default, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ForceReply {
|
||||
/// Shows reply interface to the user, as if they manually selected the
|
||||
/// bot‘s message and tapped ’Reply'.
|
||||
|
|
|
@ -10,7 +10,6 @@ use crate::types::{Animation, MessageEntity, PhotoSize};
|
|||
/// [@Botfather]: https://t.me/botfather
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Game {
|
||||
/// Title of the game.
|
||||
pub title: String,
|
||||
|
|
|
@ -6,7 +6,6 @@ use crate::types::user::User;
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#gamehighscore).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct GameHighScore {
|
||||
/// Position in high score table for the game.
|
||||
pub position: u32,
|
||||
|
|
|
@ -5,7 +5,6 @@ use serde::{Deserialize, Serialize};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#inlinekeyboardbutton).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineKeyboardButton {
|
||||
/// Label text on the button.
|
||||
pub text: String,
|
||||
|
@ -38,7 +37,6 @@ impl InlineKeyboardButton {
|
|||
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum InlineKeyboardButtonKind {
|
||||
/// HTTP or tg:// url to be opened when button is pressed.
|
||||
Url(String),
|
||||
|
|
|
@ -12,7 +12,6 @@ use crate::types::InlineKeyboardButton;
|
|||
///
|
||||
/// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize, Default)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineKeyboardMarkup {
|
||||
/// Array of button rows, each represented by an array of
|
||||
/// [`InlineKeyboardButton`] objects.
|
||||
|
|
|
@ -10,7 +10,6 @@ use crate::types::{Location, User};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequery).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQuery {
|
||||
/// Unique identifier for this query.
|
||||
pub id: String,
|
||||
|
|
|
@ -19,7 +19,6 @@ use crate::types::{
|
|||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, From)]
|
||||
#[serde(tag = "type")]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum InlineQueryResult {
|
||||
#[serde(rename = "audio")]
|
||||
CachedAudio(InlineQueryResultCachedAudio),
|
||||
|
|
|
@ -7,7 +7,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultarticle).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultArticle {
|
||||
/// Unique identifier for this result, 1-64 Bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, ParseMode};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultaudio).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultAudio {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, ParseMode};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultcachedaudio).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultCachedAudio {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, ParseMode};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultcacheddocument).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultCachedDocument {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, ParseMode};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultcachedgif).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultCachedGif {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -12,7 +12,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, ParseMode};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultCachedMpeg4Gif {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, ParseMode};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultcachedphoto).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultCachedPhoto {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultcachedsticker).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultCachedSticker {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, ParseMode};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultcachedvideo).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultCachedVideo {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, ParseMode};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultcachedvideo).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultCachedVoice {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultcachedvideo).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultContact {
|
||||
/// Unique identifier for this result, 1-64 Bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -12,7 +12,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, MimeWrapper, Parse
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultdocument).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultDocument {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -9,7 +9,6 @@ use crate::types::InlineKeyboardMarkup;
|
|||
/// [game]: https://core.telegram.org/bots/api#games
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultGame {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, ParseMode};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultgif).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultGif {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultlocation).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultLocation {
|
||||
/// Unique identifier for this result, 1-64 Bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -12,7 +12,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, ParseMode};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultMpeg4Gif {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, ParseMode};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultphoto).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultPhoto {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultvenue).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultVenue {
|
||||
/// Unique identifier for this result, 1-64 Bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -12,7 +12,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, MimeWrapper, Parse
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultvideo).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultVideo {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -12,7 +12,6 @@ use crate::types::{InlineKeyboardMarkup, InputMessageContent, ParseMode};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inlinequeryresultvoice).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InlineQueryResultVoice {
|
||||
/// Unique identifier for this result, 1-64 bytes.
|
||||
pub id: String,
|
||||
|
|
|
@ -6,7 +6,6 @@ use std::{borrow::Cow, path::PathBuf};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#inputfile).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub enum InputFile {
|
||||
File(PathBuf),
|
||||
Memory { file_name: String, data: Cow<'static, [u8]> },
|
||||
|
|
|
@ -8,7 +8,6 @@ use crate::types::{InputFile, ParseMode};
|
|||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(tag = "type")]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum InputMedia {
|
||||
Photo(InputMediaPhoto),
|
||||
Video(InputMediaVideo),
|
||||
|
@ -22,7 +21,6 @@ pub enum InputMedia {
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inputmediaphoto).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InputMediaPhoto {
|
||||
/// File to send.
|
||||
pub media: InputFile,
|
||||
|
@ -68,7 +66,6 @@ impl InputMediaPhoto {
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inputmediavideo).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InputMediaVideo {
|
||||
// File to send.
|
||||
pub media: InputFile,
|
||||
|
@ -168,7 +165,6 @@ impl InputMediaVideo {
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inputmediaanimation).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InputMediaAnimation {
|
||||
/// File to send.
|
||||
pub media: InputFile,
|
||||
|
@ -258,7 +254,6 @@ impl InputMediaAnimation {
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inputmediaaudio).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InputMediaAudio {
|
||||
/// File to send.
|
||||
pub media: InputFile,
|
||||
|
@ -354,7 +349,6 @@ impl InputMediaAudio {
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inputmediadocument).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InputMediaDocument {
|
||||
/// File to send.
|
||||
pub media: InputFile,
|
||||
|
|
|
@ -8,7 +8,6 @@ use crate::types::ParseMode;
|
|||
/// [The official docs](https://core.telegram.org/bots/api#inputmessagecontent).
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
#[non_exhaustive]
|
||||
pub enum InputMessageContent {
|
||||
Text(InputMessageContentText),
|
||||
Location(InputMessageContentLocation),
|
||||
|
@ -19,7 +18,6 @@ pub enum InputMessageContent {
|
|||
/// inline query.
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InputMessageContentText {
|
||||
/// Text of the message to be sent, 1-4096 characters.
|
||||
pub message_text: String,
|
||||
|
@ -67,7 +65,6 @@ impl InputMessageContentText {
|
|||
/// inline query.
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InputMessageContentLocation {
|
||||
/// Latitude of the location in degrees.
|
||||
pub latitude: f64,
|
||||
|
@ -105,7 +102,6 @@ impl InputMessageContentLocation {
|
|||
/// an inline query.
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InputMessageContentVenue {
|
||||
/// Latitude of the venue in degrees.
|
||||
pub latitude: f64,
|
||||
|
@ -191,7 +187,6 @@ impl InputMessageContentVenue {
|
|||
/// an inline query.
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct InputMessageContentContact {
|
||||
/// Contact's phone number.
|
||||
pub phone_number: String,
|
||||
|
|
|
@ -4,7 +4,6 @@ use serde::{Deserialize, Serialize};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#invoice).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Invoice {
|
||||
/// Product name.
|
||||
pub title: String,
|
||||
|
|
|
@ -10,7 +10,6 @@ use crate::types::{KeyboardButtonPollType, True};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#keyboardbutton).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct KeyboardButton {
|
||||
/// Text of the button. If none of the optional fields are used, it will
|
||||
/// be sent as a message when the button is pressed.
|
||||
|
@ -44,7 +43,6 @@ impl KeyboardButton {
|
|||
|
||||
// Serialize + Deserialize are implemented by hand
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
|
||||
#[non_exhaustive]
|
||||
pub enum ButtonRequest {
|
||||
Location,
|
||||
Contact,
|
||||
|
@ -54,7 +52,6 @@ pub enum ButtonRequest {
|
|||
/// Helper struct for (de)serializing [`ButtonRequest`](ButtonRequest)
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
struct RawRequest {
|
||||
/// If `true`, the user's phone number will be sent as a contact
|
||||
/// when the button is pressed. Available in private chats only.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct KeyboardButtonPollType {
|
||||
poll_type: String,
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ use serde::{Deserialize, Serialize};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#labeledprice).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct LabeledPrice {
|
||||
/// Portion label.
|
||||
pub label: String,
|
||||
|
|
|
@ -2,7 +2,6 @@ use serde::{Deserialize, Serialize};
|
|||
|
||||
/// This object represents a point on the map.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Location {
|
||||
/// Longitude as defined by sender.
|
||||
pub longitude: f64,
|
||||
|
|
|
@ -14,7 +14,6 @@ use serde::{Deserialize, Serialize};
|
|||
/// [Telegram Login Widget]: https://core.telegram.org/widgets/login
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct LoginUrl {
|
||||
pub url: String,
|
||||
pub forward_text: Option<String>,
|
||||
|
|
|
@ -5,7 +5,6 @@ use serde::{Deserialize, Serialize};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#maskposition).
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MaskPosition {
|
||||
/// The part of the face relative to which the mask should be placed. One
|
||||
/// of `forehead`, `eyes`, `mouth`, or `chin`.
|
||||
|
|
|
@ -5,7 +5,6 @@ use serde::{Deserialize, Serialize};
|
|||
///
|
||||
/// [`Bot::get_me`]: crate::Bot::get_me
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Me {
|
||||
#[serde(flatten)]
|
||||
pub user: User,
|
||||
|
|
|
@ -13,7 +13,6 @@ use crate::types::{
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#message).
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Message {
|
||||
/// Unique message identifier inside this chat.
|
||||
#[serde(rename = "message_id")]
|
||||
|
@ -65,7 +64,6 @@ impl Message {
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
#[non_exhaustive]
|
||||
pub enum MessageKind {
|
||||
Common(MessageCommon),
|
||||
NewChatMembers(MessageNewChatMembers),
|
||||
|
@ -87,7 +85,6 @@ pub enum MessageKind {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageCommon {
|
||||
/// Sender, empty for messages sent to channels.
|
||||
pub from: Option<User>,
|
||||
|
@ -138,7 +135,6 @@ impl MessageCommon {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageNewChatMembers {
|
||||
/// New members that were added to the group or supergroup and
|
||||
/// information about them (the bot itself may be one of these
|
||||
|
@ -164,7 +160,6 @@ impl MessageNewChatMembers {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageLeftChatMember {
|
||||
/// A member was removed from the group, information about them (this
|
||||
/// member may be the bot itself).
|
||||
|
@ -189,7 +184,6 @@ impl MessageLeftChatMember {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageNewChatTitle {
|
||||
/// A chat title was changed to this value.
|
||||
pub new_chat_title: String,
|
||||
|
@ -213,7 +207,6 @@ impl MessageNewChatTitle {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageNewChatPhoto {
|
||||
/// A chat photo was change to this value.
|
||||
pub new_chat_photo: Vec<PhotoSize>,
|
||||
|
@ -237,7 +230,6 @@ impl MessageNewChatPhoto {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageDeleteChatPhoto {
|
||||
/// Service message: the chat photo was deleted.
|
||||
pub delete_chat_photo: True,
|
||||
|
@ -250,7 +242,6 @@ impl MessageDeleteChatPhoto {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageGroupChatCreated {
|
||||
/// Service message: the group has been created.
|
||||
pub group_chat_created: True,
|
||||
|
@ -263,7 +254,6 @@ impl MessageGroupChatCreated {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageSupergroupChatCreated {
|
||||
/// Service message: the supergroup has been created. This field can‘t
|
||||
/// be received in a message coming through updates, because bot can’t
|
||||
|
@ -280,7 +270,6 @@ impl MessageSupergroupChatCreated {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageChannelChatCreated {
|
||||
/// Service message: the channel has been created. This field can‘t be
|
||||
/// received in a message coming through updates, because bot can’t be
|
||||
|
@ -297,7 +286,6 @@ impl MessageChannelChatCreated {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageMigrate {
|
||||
/// The group has been migrated to a supergroup with the specified
|
||||
/// identifier. This number may be greater than 32 bits and some
|
||||
|
@ -333,7 +321,6 @@ impl MessageMigrate {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessagePinned {
|
||||
/// Specified message was pinned. Note that the Message object in this
|
||||
/// field will not contain further `reply_to_message` fields even if it
|
||||
|
@ -354,7 +341,6 @@ impl MessagePinned {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageInvoice {
|
||||
/// Message is an invoice for a [payment], information about the
|
||||
/// invoice. [More about payments »].
|
||||
|
@ -376,7 +362,6 @@ impl MessageInvoice {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageSuccessfulPayment {
|
||||
/// Message is a service message about a successful payment,
|
||||
/// information about the payment. [More about payments »].
|
||||
|
@ -397,7 +382,6 @@ impl MessageSuccessfulPayment {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageConnectedWebsite {
|
||||
/// The domain name of the website on which the user has logged in.
|
||||
/// [More about Telegram Login »].
|
||||
|
@ -424,7 +408,6 @@ impl MessageConnectedWebsite {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessagePassportData {
|
||||
/// Telegram Passport data.
|
||||
pub passport_data: PassportData,
|
||||
|
@ -442,7 +425,6 @@ impl MessagePassportData {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub enum ForwardedFrom {
|
||||
#[serde(rename = "forward_from")]
|
||||
User(User),
|
||||
|
@ -452,7 +434,6 @@ pub enum ForwardedFrom {
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
#[non_exhaustive]
|
||||
pub enum ForwardKind {
|
||||
Channel(ForwardChannel),
|
||||
NonChannel(ForwardNonChannel),
|
||||
|
@ -460,7 +441,6 @@ pub enum ForwardKind {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ForwardChannel {
|
||||
#[serde(rename = "forward_date")]
|
||||
pub date: i32,
|
||||
|
@ -505,7 +485,6 @@ impl ForwardChannel {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ForwardNonChannel {
|
||||
#[serde(rename = "forward_date")]
|
||||
pub date: i32,
|
||||
|
@ -531,7 +510,6 @@ impl ForwardNonChannel {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ForwardOrigin {
|
||||
pub reply_to_message: Option<Box<Message>>,
|
||||
}
|
||||
|
@ -549,7 +527,6 @@ impl ForwardOrigin {
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
#[non_exhaustive]
|
||||
pub enum MediaKind {
|
||||
Animation(MediaAnimation),
|
||||
Audio(MediaAudio),
|
||||
|
@ -568,7 +545,6 @@ pub enum MediaKind {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaAnimation {
|
||||
/// Message is an animation, information about the animation. For
|
||||
/// backward compatibility, when this field is set, the document field
|
||||
|
@ -621,7 +597,6 @@ impl MediaAnimation {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaAudio {
|
||||
/// Message is an audio file, information about the file.
|
||||
pub audio: Audio,
|
||||
|
@ -666,7 +641,6 @@ impl MediaAudio {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaContact {
|
||||
/// Message is a shared contact, information about the contact.
|
||||
contact: Contact,
|
||||
|
@ -685,7 +659,6 @@ impl MediaContact {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaDocument {
|
||||
/// Message is a general file, information about the file.
|
||||
pub document: Document,
|
||||
|
@ -730,7 +703,6 @@ impl MediaDocument {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaGame {
|
||||
/// Message is a game, information about the game. [More
|
||||
/// about games »].
|
||||
|
@ -751,7 +723,6 @@ impl MediaGame {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaLocation {
|
||||
/// Message is a shared location, information about the location.
|
||||
pub location: Location,
|
||||
|
@ -770,7 +741,6 @@ impl MediaLocation {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaPhoto {
|
||||
/// Message is a photo, available sizes of the photo.
|
||||
pub photo: Vec<PhotoSize>,
|
||||
|
@ -836,7 +806,6 @@ impl MediaPhoto {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaPoll {
|
||||
/// Message is a native poll, information about the poll.
|
||||
pub poll: Poll,
|
||||
|
@ -854,7 +823,6 @@ impl MediaPoll {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaSticker {
|
||||
/// Message is a sticker, information about the sticker.
|
||||
pub sticker: Sticker,
|
||||
|
@ -872,7 +840,6 @@ impl MediaSticker {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaText {
|
||||
/// For text messages, the actual UTF-8 text of the message, 0-4096
|
||||
/// characters.
|
||||
|
@ -912,7 +879,6 @@ impl MediaText {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaVideo {
|
||||
/// Message is a video, information about the video.
|
||||
pub video: Video,
|
||||
|
@ -974,7 +940,6 @@ impl MediaVideo {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaVideoNote {
|
||||
/// Message is a [video note], information about the video message.
|
||||
///
|
||||
|
@ -995,7 +960,6 @@ impl MediaVideoNote {
|
|||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaVoice {
|
||||
/// Message is a voice message, information about the file.
|
||||
pub voice: Voice,
|
||||
|
@ -1040,7 +1004,6 @@ impl MediaVoice {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MediaVenue {
|
||||
/// Message is a venue, information about the venue.
|
||||
pub venue: Venue,
|
||||
|
@ -1058,7 +1021,6 @@ impl MediaVenue {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageDice {
|
||||
/// Message is a dice with random value from 1 to 6.
|
||||
dice: Dice,
|
||||
|
|
|
@ -8,7 +8,6 @@ use crate::types::{Message, User};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#messageentity).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct MessageEntity {
|
||||
#[serde(flatten)]
|
||||
pub kind: MessageEntityKind,
|
||||
|
@ -44,7 +43,6 @@ impl MessageEntity {
|
|||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[serde(tag = "type")]
|
||||
#[non_exhaustive]
|
||||
pub enum MessageEntityKind {
|
||||
Mention,
|
||||
Hashtag,
|
||||
|
|
|
@ -6,7 +6,6 @@ use crate::types::ShippingAddress;
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#orderinfo).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct OrderInfo {
|
||||
/// User's name.
|
||||
pub name: String,
|
||||
|
|
|
@ -126,7 +126,6 @@ use serde::{Deserialize, Serialize};
|
|||
/// [`HTML`]: ParseMode::HTML
|
||||
/// [`Markdown`]: ParseMode::Markdown
|
||||
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub enum ParseMode {
|
||||
MarkdownV2,
|
||||
HTML,
|
||||
|
|
|
@ -7,7 +7,6 @@ use super::{EncryptedCredentials, EncryptedPassportElement};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#passportdata).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PassportData {
|
||||
/// Array with information about documents and other Telegram Passport
|
||||
/// elements that was shared with the bot.
|
||||
|
|
|
@ -5,7 +5,6 @@ use serde::{Deserialize, Serialize};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#passportelementerror).
|
||||
#[derive(Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PassportElementError {
|
||||
/// Error message.
|
||||
message: String,
|
||||
|
@ -38,7 +37,6 @@ impl PassportElementError {
|
|||
|
||||
#[serde(tag = "source")]
|
||||
#[derive(Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub enum PassportElementErrorKind {
|
||||
#[serde(rename = "data")]
|
||||
DataField(PassportElementErrorDataField),
|
||||
|
@ -75,7 +73,6 @@ pub enum PassportElementErrorKind {
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#passportelementerrordatafield).
|
||||
#[derive(Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PassportElementErrorDataField {
|
||||
/// The section of the user's Telegram Passport which has the error.
|
||||
pub r#type: PassportElementErrorDataFieldType,
|
||||
|
@ -129,7 +126,6 @@ impl PassportElementErrorDataField {
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#passportelementerrorfrontside).
|
||||
#[derive(Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PassportElementErrorFrontSide {
|
||||
/// The section of the user's Telegram Passport which has the issue.
|
||||
pub r#type: PassportElementErrorFrontSideType,
|
||||
|
@ -168,7 +164,6 @@ impl PassportElementErrorFrontSide {
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#passportelementerrorreverseside).
|
||||
#[derive(Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PassportElementErrorReverseSide {
|
||||
/// The section of the user's Telegram Passport which has the issue.
|
||||
pub r#type: PassportElementErrorReverseSideType,
|
||||
|
@ -206,7 +201,6 @@ impl PassportElementErrorReverseSide {
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#passportelementerrorselfie).
|
||||
#[derive(Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PassportElementErrorSelfie {
|
||||
/// The section of the user's Telegram Passport which has the issue.
|
||||
pub r#type: PassportElementErrorSelfieType,
|
||||
|
@ -244,7 +238,6 @@ impl PassportElementErrorSelfie {
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#passportelementerrorfile).
|
||||
#[derive(Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PassportElementErrorFile {
|
||||
/// The section of the user's Telegram Passport which has the issue.
|
||||
pub r#type: PassportElementErrorFileType,
|
||||
|
@ -282,7 +275,6 @@ impl PassportElementErrorFile {
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#passportelementerrorfiles).
|
||||
#[derive(Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PassportElementErrorFiles {
|
||||
/// The section of the user's Telegram Passport which has the issue.
|
||||
pub r#type: PassportElementErrorFilesType,
|
||||
|
@ -320,7 +312,6 @@ impl PassportElementErrorFiles {
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#passportelementerrortranslationfile).
|
||||
#[derive(Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PassportElementErrorTranslationFile {
|
||||
/// Type of element of the user's Telegram Passport which has the
|
||||
/// issue.
|
||||
|
@ -359,7 +350,6 @@ impl PassportElementErrorTranslationFile {
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#passportelementerrortranslationfiles).
|
||||
#[derive(Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PassportElementErrorTranslationFiles {
|
||||
/// Type of element of the user's Telegram Passport which has the issue
|
||||
pub r#type: PassportElementErrorTranslationFilesType,
|
||||
|
@ -396,7 +386,6 @@ impl PassportElementErrorTranslationFiles {
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#passportelementerrorunspecified).
|
||||
#[derive(Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PassportElementErrorUnspecified {
|
||||
/// Type of element of the user's Telegram Passport which has the
|
||||
/// issue.
|
||||
|
@ -430,7 +419,6 @@ impl PassportElementErrorUnspecified {
|
|||
|
||||
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum PassportElementErrorDataFieldType {
|
||||
PersonalDetails,
|
||||
Passport,
|
||||
|
@ -442,7 +430,6 @@ pub enum PassportElementErrorDataFieldType {
|
|||
|
||||
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum PassportElementErrorFrontSideType {
|
||||
Passport,
|
||||
DriverLicense,
|
||||
|
@ -452,7 +439,6 @@ pub enum PassportElementErrorFrontSideType {
|
|||
|
||||
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum PassportElementErrorReverseSideType {
|
||||
DriverLicense,
|
||||
IdentityCard,
|
||||
|
@ -460,7 +446,6 @@ pub enum PassportElementErrorReverseSideType {
|
|||
|
||||
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum PassportElementErrorSelfieType {
|
||||
Passport,
|
||||
DriverLicense,
|
||||
|
@ -470,7 +455,6 @@ pub enum PassportElementErrorSelfieType {
|
|||
|
||||
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum PassportElementErrorFileType {
|
||||
UtilityBill,
|
||||
BankStatement,
|
||||
|
@ -481,7 +465,6 @@ pub enum PassportElementErrorFileType {
|
|||
|
||||
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum PassportElementErrorFilesType {
|
||||
UtilityBill,
|
||||
BankStatement,
|
||||
|
@ -492,7 +475,6 @@ pub enum PassportElementErrorFilesType {
|
|||
|
||||
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum PassportElementErrorTranslationFileType {
|
||||
Passport,
|
||||
DriverLicense,
|
||||
|
@ -507,7 +489,6 @@ pub enum PassportElementErrorTranslationFileType {
|
|||
|
||||
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum PassportElementErrorTranslationFilesType {
|
||||
Passport,
|
||||
DriverLicense,
|
||||
|
@ -522,7 +503,6 @@ pub enum PassportElementErrorTranslationFilesType {
|
|||
|
||||
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum PassportElementErrorUnspecifiedType {
|
||||
DataField,
|
||||
FrontSide,
|
||||
|
|
|
@ -7,7 +7,6 @@ use serde::{Deserialize, Serialize};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#passportfile).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PassportFile {
|
||||
/// Identifier for this file.
|
||||
pub file_id: String,
|
||||
|
|
|
@ -6,7 +6,6 @@ use serde::{Deserialize, Serialize};
|
|||
/// [sticker]: crate::types::Sticker
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PhotoSize {
|
||||
/// Identifier for this file.
|
||||
pub file_id: String,
|
||||
|
|
|
@ -6,7 +6,6 @@ use serde::{Deserialize, Serialize};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#poll).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Poll {
|
||||
/// Unique poll identifier.
|
||||
pub id: String,
|
||||
|
@ -175,7 +174,6 @@ impl Poll {
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#polloption).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PollOption {
|
||||
/// Option text, 1-100 characters.
|
||||
pub text: String,
|
||||
|
|
|
@ -2,7 +2,6 @@ use crate::types::User;
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PollAnswer {
|
||||
/// Unique poll identifier.
|
||||
pub poll_id: String,
|
||||
|
|
|
@ -2,7 +2,6 @@ use serde::{Deserialize, Serialize};
|
|||
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
#[non_exhaustive]
|
||||
pub enum PollType {
|
||||
Quiz,
|
||||
Regular,
|
||||
|
|
|
@ -7,7 +7,6 @@ use crate::types::{Currency, OrderInfo, User};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#precheckoutquery).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct PreCheckoutQuery {
|
||||
/// Unique query identifier.
|
||||
pub id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::KeyboardButton;
|
|||
/// [Introduction to bots]: https://core.telegram.org/bots#keyboards
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize, Default)]
|
||||
#[non_exhaustive]
|
||||
pub struct ReplyKeyboardMarkup {
|
||||
/// Array of button rows, each represented by an Array of
|
||||
/// [`KeyboardButton`] objects
|
||||
|
|
|
@ -14,7 +14,6 @@ use crate::types::True;
|
|||
/// [`ReplyKeyboardMarkup`]: crate::types::ReplyKeyboardMarkup
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Copy, Clone, Debug, Default, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ReplyKeyboardRemove {
|
||||
/// Requests clients to remove the custom keyboard (user will not be able
|
||||
/// to summon this keyboard; if you want to hide the keyboard from sight
|
||||
|
|
|
@ -5,7 +5,6 @@ use crate::types::{ForceReply, InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyK
|
|||
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize, From)]
|
||||
#[serde(untagged)]
|
||||
#[non_exhaustive]
|
||||
pub enum ReplyMarkup {
|
||||
InlineKeyboardMarkup(InlineKeyboardMarkup),
|
||||
ReplyKeyboardMarkup(ReplyKeyboardMarkup),
|
||||
|
|
|
@ -5,7 +5,6 @@ use serde::{Deserialize, Serialize};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#responseparameters).
|
||||
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum ResponseParameters {
|
||||
/// The group has been migrated to a supergroup with the specified
|
||||
/// identifier. This number may be greater than 32 bits and some
|
||||
|
|
|
@ -5,7 +5,6 @@ use crate::types::{ChatId, InlineKeyboardMarkup, LabeledPrice};
|
|||
// TODO: missing docs
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct SendInvoice {
|
||||
pub chat_id: ChatId,
|
||||
pub title: String,
|
||||
|
|
|
@ -5,7 +5,6 @@ use serde::{Deserialize, Serialize};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#shippingaddress).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ShippingAddress {
|
||||
/// ISO 3166-1 alpha-2 country code.
|
||||
pub country_code: CountryCode,
|
||||
|
|
|
@ -6,7 +6,6 @@ use crate::types::LabeledPrice;
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#shippingoption).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ShippingOption {
|
||||
/// Shipping option identifier.
|
||||
pub id: String,
|
||||
|
|
|
@ -6,7 +6,6 @@ use crate::types::{ShippingAddress, User};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#shippingquery).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct ShippingQuery {
|
||||
/// Unique query identifier.
|
||||
pub id: String,
|
||||
|
|
|
@ -7,7 +7,6 @@ use crate::types::{MaskPosition, PhotoSize};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#sticker).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Sticker {
|
||||
/// Identifier for this file.
|
||||
pub file_id: String,
|
||||
|
|
|
@ -6,7 +6,6 @@ use crate::types::{PhotoSize, Sticker};
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#stickerset).
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct StickerSet {
|
||||
/// Sticker set name.
|
||||
pub name: String,
|
||||
|
|
|
@ -3,7 +3,6 @@ use serde::Serialize;
|
|||
use crate::types::InputFile;
|
||||
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize)]
|
||||
#[non_exhaustive]
|
||||
#[serde(untagged)]
|
||||
pub enum StickerType {
|
||||
/// PNG image with the sticker, must be up to 512 kilobytes in size,
|
||||
|
|
|
@ -7,7 +7,6 @@ use crate::types::{Currency, OrderInfo};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#successfulpayment).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct SuccessfulPayment {
|
||||
/// Three-letter ISO 4217 [currency] code.
|
||||
///
|
||||
|
|
|
@ -13,7 +13,6 @@ use crate::types::{
|
|||
///
|
||||
/// [object]: https://core.telegram.org/bots/api#available-types
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Update {
|
||||
/// The update‘s unique identifier. Update identifiers start from a certain
|
||||
/// positive number and increase sequentially. This ID becomes especially
|
||||
|
@ -49,7 +48,6 @@ impl Update {
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[non_exhaustive]
|
||||
pub enum UpdateKind {
|
||||
/// New incoming message of any kind — text, photo, sticker, etc.
|
||||
Message(Message),
|
||||
|
|
|
@ -5,7 +5,6 @@ use serde::{Deserialize, Serialize};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#user).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct User {
|
||||
/// Unique identifier for this user or bot.
|
||||
pub id: i32,
|
||||
|
|
|
@ -6,7 +6,6 @@ use crate::types::PhotoSize;
|
|||
///
|
||||
/// [The official docs](https://core.telegram.org/bots/api#userprofilephotos).
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct UserProfilePhotos {
|
||||
/// Total number of profile pictures the target user has.
|
||||
pub total_count: u32,
|
||||
|
|
|
@ -5,7 +5,6 @@ use crate::types::Location;
|
|||
/// This object represents a venue.
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Venue {
|
||||
/// Venue location.
|
||||
pub location: Location,
|
||||
|
|
|
@ -7,7 +7,6 @@ use crate::types::{MimeWrapper, PhotoSize};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#video).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Video {
|
||||
/// Identifier for this file.
|
||||
pub file_id: String,
|
||||
|
|
|
@ -11,7 +11,6 @@ use crate::types::PhotoSize;
|
|||
/// [v4.0]: https://telegram.org/blog/video-messages-and-telescope
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct VideoNote {
|
||||
/// Identifier for this file.
|
||||
pub file_id: String,
|
||||
|
|
|
@ -6,7 +6,6 @@ use serde::{Deserialize, Serialize};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#voice).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct Voice {
|
||||
/// Identifier for this file.
|
||||
pub file_id: String,
|
||||
|
|
|
@ -5,7 +5,6 @@ use serde::{Deserialize, Serialize};
|
|||
/// [The official docs](https://core.telegram.org/bots/api#webhookinfo).
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
|
||||
#[non_exhaustive]
|
||||
pub struct WebhookInfo {
|
||||
/// Webhook URL, may be empty if webhook is not set up.
|
||||
pub url: String,
|
||||
|
|
Loading…
Add table
Reference in a new issue