Skip to main content

Crate rustigram_types

Crate rustigram_types 

Source
Expand description

Type definitions for the Telegram Bot API.

This crate contains every struct, enum, and type alias described in the official Bot API documentation. All types implement serde::Serialize and serde::Deserialize and map directly to the JSON objects Telegram sends and receives.

You rarely need to depend on this crate directly — the rustigram facade re-exports everything you need for day-to-day bot development.

§Organisation

ModuleContents
backgroundbackground::BackgroundFill, background::BackgroundType, background::ChatBackground
businessBusiness profile types, business::Birthdate, business::UserRating
chatchat::Chat, chat::ChatFullInfo, chat::ChatPermissions, locations, venues
chat_memberAll six chat_member::ChatMember variants
checklistchecklist::Checklist, checklist::ChecklistTask, checklist::InputChecklist, service messages
direct_messagesdirect_messages::DirectMessagesTopic, price-changed service messages
filefile::File, file::PhotoSize, file::InputFile, file::VideoQuality, media types
managed_botmanaged_bot::ManagedBotCreated
messagemessage::Message, message::MessageEntity, message::ParseMode, reply types
updateupdate::Update, update::UpdateKind, update::CallbackQuery, update::BusinessBotRights
useruser::User, user::ChatId, user::BotCommand
keyboardInline and reply keyboards, keyboard::ReplyMarkup
paymentspayments::LabeledPrice, invoices, Star transactions, payments::TransactionPartner, payments::OwnedGift
pollpoll::Poll, poll::PollAnswer, poll::InputPollOption
rich_messagerich_message::RichMessage, rich_message::RichBlock, rich_message::RichText, rich_message::InputRichMessage
stickersticker::Sticker, sticker::StickerSet, sticker::InputSticker
suggested_postsuggested_post::SuggestedPostInfo, suggested_post::SuggestedPostParameters, service messages
inlineinline::InlineQuery, all InlineQueryResult variants
storyStory types and area definitions
forumforum::ForumTopic and the six forum service messages
sharedshared::UsersShared, shared::ChatShared, shared::SharedUser
video_chatThe four video chat service messages
passportTelegram Passport types and error variants
gamesgames::GameHighScore
giftsgifts::Gift, gifts::Gifts
giveawaygiveaway::Giveaway and the three giveaway service messages
reactionRe-exports message::ReactionType
webhookwebhook::WebhookInfo

Re-exports§

pub use background::BackgroundFill;
pub use background::BackgroundFillFreeformGradient;
pub use background::BackgroundFillGradient;
pub use background::BackgroundFillSolid;
pub use background::BackgroundType;
pub use background::BackgroundTypeChatTheme;
pub use background::BackgroundTypeFill;
pub use background::BackgroundTypePattern;
pub use background::BackgroundTypeWallpaper;
pub use background::ChatBackground;
pub use business::Birthdate;
pub use business::BusinessIntro;
pub use business::BusinessLocation;
pub use business::BusinessOpeningHours;
pub use business::BusinessOpeningHoursInterval;
pub use business::UserRating;
pub use chat::Chat;
pub use chat::ChatFullInfo;
pub use chat::ChatJoinRequest;
pub use chat::ChatLocation;
pub use chat::ChatPermissions;
pub use chat::ChatPhoto;
pub use chat::ChatType;
pub use chat::Location;
pub use chat::Venue;
pub use chat_member::ChatMember;
pub use chat_member::ChatMemberAdministrator;
pub use chat_member::ChatMemberBanned;
pub use chat_member::ChatMemberLeft;
pub use chat_member::ChatMemberMember;
pub use chat_member::ChatMemberOwner;
pub use chat_member::ChatMemberRestricted;
pub use checklist::Checklist;
pub use checklist::ChecklistTask;
pub use checklist::ChecklistTasksAdded;
pub use checklist::ChecklistTasksDone;
pub use checklist::InputChecklist;
pub use checklist::InputChecklistTask;
pub use community::Community;
pub use community::CommunityChatAdded;
pub use community::CommunityChatRemoved;
pub use direct_messages::DirectMessagePriceChanged;
pub use direct_messages::DirectMessagesTopic;
pub use direct_messages::PaidMessagePriceChanged;
pub use file::Animation;
pub use file::Audio;
pub use file::Document;
pub use file::File;
pub use file::InputFile;
pub use file::InputMedia;
pub use file::InputMediaAnimation;
pub use file::InputMediaAudio;
pub use file::InputMediaDocument;
pub use file::InputMediaLivePhoto;
pub use file::InputMediaLocation;
pub use file::InputMediaPhoto;
pub use file::InputMediaSticker;
pub use file::InputMediaVenue;
pub use file::InputMediaVideo;
pub use file::InputMediaVoiceNote;
pub use file::InputPaidMedia;
pub use file::InputPaidMediaLivePhoto;
pub use file::InputPaidMediaPhoto;
pub use file::InputPaidMediaVideo;
pub use file::InputProfilePhoto;
pub use file::InputProfilePhotoAnimated;
pub use file::InputProfilePhotoStatic;
pub use file::LivePhoto;
pub use file::PassportFile;
pub use file::PhotoSize;
pub use file::Video;
pub use file::VideoNote;
pub use file::VideoQuality;
pub use file::Voice;
pub use forum::ForumTopic;
pub use forum::ForumTopicClosed;
pub use forum::ForumTopicCreated;
pub use forum::ForumTopicEdited;
pub use forum::ForumTopicReopened;
pub use forum::GeneralForumTopicHidden;
pub use forum::GeneralForumTopicUnhidden;
pub use games::CallbackGame;
pub use games::Game;
pub use games::GameHighScore;
pub use gifts::Gift;
pub use gifts::GiftBackground;
pub use gifts::GiftInfo;
pub use gifts::Gifts;
pub use gifts::UniqueGift;
pub use gifts::UniqueGiftBackdrop;
pub use gifts::UniqueGiftBackdropColors;
pub use gifts::UniqueGiftColors;
pub use gifts::UniqueGiftInfo;
pub use gifts::UniqueGiftModel;
pub use gifts::UniqueGiftSymbol;
pub use giveaway::Giveaway;
pub use giveaway::GiveawayCompleted;
pub use giveaway::GiveawayCreated;
pub use giveaway::GiveawayWinners;
pub use inline::ChosenInlineResult;
pub use inline::InlineQuery;
pub use inline::InlineQueryResult;
pub use inline::InlineQueryResultArticle;
pub use inline::InlineQueryResultAudio;
pub use inline::InlineQueryResultCachedAudio;
pub use inline::InlineQueryResultCachedDocument;
pub use inline::InlineQueryResultCachedGif;
pub use inline::InlineQueryResultCachedMpeg4Gif;
pub use inline::InlineQueryResultCachedPhoto;
pub use inline::InlineQueryResultCachedSticker;
pub use inline::InlineQueryResultCachedVideo;
pub use inline::InlineQueryResultCachedVoice;
pub use inline::InlineQueryResultContact;
pub use inline::InlineQueryResultDocument;
pub use inline::InlineQueryResultGame;
pub use inline::InlineQueryResultGif;
pub use inline::InlineQueryResultLocation;
pub use inline::InlineQueryResultMpeg4Gif;
pub use inline::InlineQueryResultPhoto;
pub use inline::InlineQueryResultVenue;
pub use inline::InlineQueryResultVideo;
pub use inline::InlineQueryResultVoice;
pub use inline::InlineQueryResultsButton;
pub use inline::InputContactMessageContent;
pub use inline::InputInvoiceMessageContent;
pub use inline::InputLocationMessageContent;
pub use inline::InputMessageContent;
pub use inline::InputTextMessageContent;
pub use inline::InputVenueMessageContent;
pub use inline::PreparedInlineMessage;
pub use inline::SentGuestMessage;
pub use inline::SentWebAppMessage;
pub use keyboard::ButtonStyle;
pub use keyboard::CopyTextButton;
pub use keyboard::ForceReply;
pub use keyboard::InlineKeyboardButton;
pub use keyboard::InlineKeyboardMarkup;
pub use keyboard::KeyboardButton;
pub use keyboard::KeyboardButtonPollType;
pub use keyboard::KeyboardButtonRequestChat;
pub use keyboard::KeyboardButtonRequestManagedBot;
pub use keyboard::KeyboardButtonRequestUsers;
pub use keyboard::LoginUrl;
pub use keyboard::MenuButton;
pub use keyboard::PreparedKeyboardButton;
pub use keyboard::ReplyKeyboardMarkup;
pub use keyboard::ReplyKeyboardRemove;
pub use keyboard::ReplyMarkup;
pub use keyboard::SwitchInlineQueryChosenChat;
pub use managed_bot::ManagedBotCreated;
pub use message::ChatOwnerChanged;
pub use message::ChatOwnerLeft;
pub use message::Contact;
pub use message::Dice;
pub use message::ExternalReplyInfo;
pub use message::InaccessibleMessage;
pub use message::LinkPreviewOptions;
pub use message::MaybeInaccessibleMessage;
pub use message::Message;
pub use message::MessageAutoDeleteTimerChanged;
pub use message::MessageEntity;
pub use message::MessageEntityKind;
pub use message::MessageId;
pub use message::MessageOrigin;
pub use message::ParseMode;
pub use message::ProximityAlertTriggered;
pub use message::ReactionType;
pub use message::ReplyParameters;
pub use message::TextQuote;
pub use message::WebAppData;
pub use message::WebAppInfo;
pub use message::WriteAccessAllowed;
pub use passport::EncryptedCredentials;
pub use passport::EncryptedPassportElement;
pub use passport::PassportData;
pub use passport::PassportElementError;
pub use payments::AcceptedGiftTypes;
pub use payments::AffiliateInfo;
pub use payments::BotSubscriptionUpdated;
pub use payments::Invoice;
pub use payments::LabeledPrice;
pub use payments::OrderInfo;
pub use payments::OwnedGift;
pub use payments::OwnedGiftRegular;
pub use payments::OwnedGiftUnique;
pub use payments::OwnedGifts;
pub use payments::PaidMedia;
pub use payments::PaidMediaInfo;
pub use payments::PaidMediaLivePhoto;
pub use payments::PaidMediaPhoto;
pub use payments::PaidMediaPreview;
pub use payments::PaidMediaVideo;
pub use payments::PreCheckoutQuery;
pub use payments::RefundedPayment;
pub use payments::RevenueWithdrawalState;
pub use payments::ShippingAddress;
pub use payments::ShippingOption;
pub use payments::ShippingQuery;
pub use payments::StarAmount;
pub use payments::StarTransaction;
pub use payments::StarTransactions;
pub use payments::SuccessfulPayment;
pub use payments::TransactionPartner;
pub use payments::TransactionPartnerAffiliateProgram;
pub use payments::TransactionPartnerChat;
pub use payments::TransactionPartnerFragment;
pub use payments::TransactionPartnerTelegramApi;
pub use payments::TransactionPartnerUser;
pub use poll::InputPollMedia;
pub use poll::InputPollOption;
pub use poll::InputPollOptionMedia;
pub use poll::Poll;
pub use poll::PollAnswer;
pub use poll::PollMedia;
pub use poll::PollOption;
pub use poll::PollOptionAdded;
pub use poll::PollOptionDeleted;
pub use poll::PollType;
pub use rich_message::InputRichBlock;
pub use rich_message::InputRichBlockAnchor;
pub use rich_message::InputRichBlockAnimation;
pub use rich_message::InputRichBlockAudio;
pub use rich_message::InputRichBlockBlockQuotation;
pub use rich_message::InputRichBlockCollage;
pub use rich_message::InputRichBlockDetails;
pub use rich_message::InputRichBlockDivider;
pub use rich_message::InputRichBlockFooter;
pub use rich_message::InputRichBlockList;
pub use rich_message::InputRichBlockListItem;
pub use rich_message::InputRichBlockMap;
pub use rich_message::InputRichBlockMathematicalExpression;
pub use rich_message::InputRichBlockParagraph;
pub use rich_message::InputRichBlockPhoto;
pub use rich_message::InputRichBlockPreformatted;
pub use rich_message::InputRichBlockPullQuotation;
pub use rich_message::InputRichBlockSectionHeading;
pub use rich_message::InputRichBlockSlideshow;
pub use rich_message::InputRichBlockTable;
pub use rich_message::InputRichBlockThinking;
pub use rich_message::InputRichBlockVideo;
pub use rich_message::InputRichBlockVoiceNote;
pub use rich_message::InputRichMessage;
pub use rich_message::InputRichMessageContent;
pub use rich_message::InputRichMessageMedia;
pub use rich_message::InputRichMessageMediaKind;
pub use rich_message::RichBlock;
pub use rich_message::RichBlockAnchor;
pub use rich_message::RichBlockAnimation;
pub use rich_message::RichBlockAudio;
pub use rich_message::RichBlockBlockQuotation;
pub use rich_message::RichBlockCaption;
pub use rich_message::RichBlockCollage;
pub use rich_message::RichBlockDetails;
pub use rich_message::RichBlockDivider;
pub use rich_message::RichBlockFooter;
pub use rich_message::RichBlockList;
pub use rich_message::RichBlockListItem;
pub use rich_message::RichBlockMap;
pub use rich_message::RichBlockMathematicalExpression;
pub use rich_message::RichBlockParagraph;
pub use rich_message::RichBlockPhoto;
pub use rich_message::RichBlockPreformatted;
pub use rich_message::RichBlockPullQuotation;
pub use rich_message::RichBlockSectionHeading;
pub use rich_message::RichBlockSlideshow;
pub use rich_message::RichBlockTable;
pub use rich_message::RichBlockTableCell;
pub use rich_message::RichBlockThinking;
pub use rich_message::RichBlockVideo;
pub use rich_message::RichBlockVoiceNote;
pub use rich_message::RichMessage;
pub use rich_message::RichText;
pub use rich_message::RichTextAnchor;
pub use rich_message::RichTextBankCardNumber;
pub use rich_message::RichTextBold;
pub use rich_message::RichTextBotCommand;
pub use rich_message::RichTextCashtag;
pub use rich_message::RichTextCode;
pub use rich_message::RichTextCustomEmoji;
pub use rich_message::RichTextDateTime;
pub use rich_message::RichTextEmailAddress;
pub use rich_message::RichTextHashtag;
pub use rich_message::RichTextItalic;
pub use rich_message::RichTextMarked;
pub use rich_message::RichTextMathematicalExpression;
pub use rich_message::RichTextMention;
pub use rich_message::RichTextNode;
pub use rich_message::RichTextPhoneNumber;
pub use rich_message::RichTextReference;
pub use rich_message::RichTextSpoiler;
pub use rich_message::RichTextStrikethrough;
pub use rich_message::RichTextSubscript;
pub use rich_message::RichTextSuperscript;
pub use rich_message::RichTextTextMention;
pub use rich_message::RichTextUnderline;
pub use rich_message::RichTextUrl;
pub use shared::ChatShared;
pub use shared::SharedUser;
pub use shared::UsersShared;
pub use sticker::InputSticker;
pub use sticker::MaskPoint;
pub use sticker::MaskPosition;
pub use sticker::Sticker;
pub use sticker::StickerFormat;
pub use sticker::StickerSet;
pub use sticker::StickerType;
pub use story::InputStoryContent;
pub use story::InputStoryContentPhoto;
pub use story::InputStoryContentVideo;
pub use story::LocationAddress;
pub use story::Story;
pub use story::StoryArea;
pub use story::StoryAreaPosition;
pub use story::StoryAreaType;
pub use suggested_post::SuggestedPostApprovalFailed;
pub use suggested_post::SuggestedPostApproved;
pub use suggested_post::SuggestedPostDeclined;
pub use suggested_post::SuggestedPostInfo;
pub use suggested_post::SuggestedPostPaid;
pub use suggested_post::SuggestedPostParameters;
pub use suggested_post::SuggestedPostPrice;
pub use suggested_post::SuggestedPostRefunded;
pub use update::BusinessBotRights;
pub use update::BusinessConnection;
pub use update::BusinessMessagesDeleted;
pub use update::CallbackQuery;
pub use update::ChatBoost;
pub use update::ChatBoostAdded;
pub use update::ChatBoostRemoved;
pub use update::ChatBoostSource;
pub use update::ChatBoostSourceGiftCode;
pub use update::ChatBoostSourceGiveaway;
pub use update::ChatBoostSourcePremium;
pub use update::ChatBoostUpdated;
pub use update::ChatMemberUpdated;
pub use update::ManagedBotUpdated;
pub use update::MessageReactionCountUpdated;
pub use update::MessageReactionUpdated;
pub use update::PaidMediaPurchased;
pub use update::ReactionCount;
pub use update::Update;
pub use update::UpdateKind;
pub use update::UserChatBoosts;
pub use user::BotAccessSettings;
pub use user::BotCommand;
pub use user::BotCommandScope;
pub use user::BotDescription;
pub use user::BotName;
pub use user::BotShortDescription;
pub use user::ChatAdministratorRights;
pub use user::ChatId;
pub use user::User;
pub use user::UserProfileAudios;
pub use user::UserProfilePhotos;
pub use video_chat::VideoChatEnded;
pub use video_chat::VideoChatParticipantsInvited;
pub use video_chat::VideoChatScheduled;
pub use video_chat::VideoChatStarted;
pub use webhook::WebhookInfo;

Modules§

background
Chat background types.
business
Business account profile types.
chat
Chat and location types.
chat_member
Chat member status types.
checklist
Checklist content type and related service messages.
community
Community (linked chats) types.
direct_messages
Direct messages topic and channel pricing service messages.
file
File and media types.
forum
Forum topic types.
games
Game types.
gifts
Gift types.
giveaway
Giveaway types and service messages.
inline
Inline query and result types.
keyboard
Keyboard and markup types.
managed_bot
Managed bot service message types.
message
Message and entity types.
passport
Telegram Passport types.
payments
Payment and invoice types.
poll
Poll types.
reaction
Reaction types.
rich_message
Rich message types (Bot API 10.1).
shared
Users and chats shared with the bot via keyboard request buttons.
sticker
Sticker types.
story
Story types.
suggested_post
Suggested post types and service messages.
update
Update and event types.
user
User and bot command types.
video_chat
Video chat service message types.
webhook
Webhook info types.