Trait teloxide_core::requests::RequesterExt
source · [−]pub trait RequesterExt: Requester {
fn cache_me(self) -> CacheMe<Self>ⓘNotable traits for CacheMe<B>impl<B> Requester for CacheMe<B>where
B: Requester, type Err = B::Err; type GetMe = CachedMeRequest<B::GetMe>; type LogOut = B::LogOut; type Close = B::Close; type GetUpdates = B::GetUpdates; type SetWebhook = B::SetWebhook; type DeleteWebhook = B::DeleteWebhook; type GetWebhookInfo = B::GetWebhookInfo; type ForwardMessage = B::ForwardMessage; type CopyMessage = B::CopyMessage; type SendMessage = B::SendMessage; type SendPhoto = B::SendPhoto; type SendAudio = B::SendAudio; type SendDocument = B::SendDocument; type SendVideo = B::SendVideo; type SendAnimation = B::SendAnimation; type SendVoice = B::SendVoice; type SendVideoNote = B::SendVideoNote; type SendMediaGroup = B::SendMediaGroup; type SendLocation = B::SendLocation; type EditMessageLiveLocation = B::EditMessageLiveLocation; type EditMessageLiveLocationInline = B::EditMessageLiveLocationInline; type StopMessageLiveLocation = B::StopMessageLiveLocation; type StopMessageLiveLocationInline = B::StopMessageLiveLocationInline; type SendVenue = B::SendVenue; type SendContact = B::SendContact; type SendPoll = B::SendPoll; type SendDice = B::SendDice; type SendChatAction = B::SendChatAction; type GetUserProfilePhotos = B::GetUserProfilePhotos; type GetFile = B::GetFile; type KickChatMember = B::KickChatMember; type BanChatMember = B::BanChatMember; type UnbanChatMember = B::UnbanChatMember; type RestrictChatMember = B::RestrictChatMember; type PromoteChatMember = B::PromoteChatMember; type SetChatAdministratorCustomTitle = B::SetChatAdministratorCustomTitle; type BanChatSenderChat = B::BanChatSenderChat; type UnbanChatSenderChat = B::UnbanChatSenderChat; type SetChatPermissions = B::SetChatPermissions; type ExportChatInviteLink = B::ExportChatInviteLink; type CreateChatInviteLink = B::CreateChatInviteLink; type EditChatInviteLink = B::EditChatInviteLink; type RevokeChatInviteLink = B::RevokeChatInviteLink; type SetChatPhoto = B::SetChatPhoto; type DeleteChatPhoto = B::DeleteChatPhoto; type SetChatTitle = B::SetChatTitle; type SetChatDescription = B::SetChatDescription; type PinChatMessage = B::PinChatMessage; type UnpinChatMessage = B::UnpinChatMessage; type UnpinAllChatMessages = B::UnpinAllChatMessages; type LeaveChat = B::LeaveChat; type GetChat = B::GetChat; type GetChatAdministrators = B::GetChatAdministrators; type GetChatMembersCount = B::GetChatMembersCount; type GetChatMemberCount = B::GetChatMemberCount; type GetChatMember = B::GetChatMember; type SetChatStickerSet = B::SetChatStickerSet; type DeleteChatStickerSet = B::DeleteChatStickerSet; type AnswerCallbackQuery = B::AnswerCallbackQuery; type SetMyCommands = B::SetMyCommands; type GetMyCommands = B::GetMyCommands; type SetChatMenuButton = B::SetChatMenuButton; type GetChatMenuButton = B::GetChatMenuButton; type SetMyDefaultAdministratorRights = B::SetMyDefaultAdministratorRights; type GetMyDefaultAdministratorRights = B::GetMyDefaultAdministratorRights; type DeleteMyCommands = B::DeleteMyCommands; type AnswerInlineQuery = B::AnswerInlineQuery; type AnswerWebAppQuery = B::AnswerWebAppQuery; type EditMessageText = B::EditMessageText; type EditMessageTextInline = B::EditMessageTextInline; type EditMessageCaption = B::EditMessageCaption; type EditMessageCaptionInline = B::EditMessageCaptionInline; type EditMessageMedia = B::EditMessageMedia; type EditMessageMediaInline = B::EditMessageMediaInline; type EditMessageReplyMarkup = B::EditMessageReplyMarkup; type EditMessageReplyMarkupInline = B::EditMessageReplyMarkupInline; type StopPoll = B::StopPoll; type DeleteMessage = B::DeleteMessage; type SendSticker = B::SendSticker; type GetStickerSet = B::GetStickerSet; type GetCustomEmojiStickers = B::GetCustomEmojiStickers; type UploadStickerFile = B::UploadStickerFile; type CreateNewStickerSet = B::CreateNewStickerSet; type AddStickerToSet = B::AddStickerToSet; type SetStickerPositionInSet = B::SetStickerPositionInSet; type DeleteStickerFromSet = B::DeleteStickerFromSet; type SetStickerSetThumb = B::SetStickerSetThumb; type SendInvoice = B::SendInvoice; type CreateInvoiceLink = B::CreateInvoiceLink; type AnswerShippingQuery = B::AnswerShippingQuery; type AnswerPreCheckoutQuery = B::AnswerPreCheckoutQuery; type SetPassportDataErrors = B::SetPassportDataErrors; type SendGame = B::SendGame; type SetGameScore = B::SetGameScore; type SetGameScoreInline = B::SetGameScoreInline; type GetGameHighScores = B::GetGameHighScores; type ApproveChatJoinRequest = B::ApproveChatJoinRequest; type DeclineChatJoinRequest = B::DeclineChatJoinRequest;
where
Self: Sized,
{ ... }
fn auto_send(self) -> AutoSend<Self>ⓘNotable traits for AutoSend<B>impl<B> Requester for AutoSend<B>where
B: Requester, type Err = B::Err; type GetMe = AutoRequest<B::GetMe>; type LogOut = AutoRequest<B::LogOut>; type Close = AutoRequest<B::Close>; type GetUpdates = AutoRequest<B::GetUpdates>; type SetWebhook = AutoRequest<B::SetWebhook>; type DeleteWebhook = AutoRequest<B::DeleteWebhook>; type GetWebhookInfo = AutoRequest<B::GetWebhookInfo>; type ForwardMessage = AutoRequest<B::ForwardMessage>; type CopyMessage = AutoRequest<B::CopyMessage>; type SendMessage = AutoRequest<B::SendMessage>; type SendPhoto = AutoRequest<B::SendPhoto>; type SendAudio = AutoRequest<B::SendAudio>; type SendDocument = AutoRequest<B::SendDocument>; type SendVideo = AutoRequest<B::SendVideo>; type SendAnimation = AutoRequest<B::SendAnimation>; type SendVoice = AutoRequest<B::SendVoice>; type SendVideoNote = AutoRequest<B::SendVideoNote>; type SendMediaGroup = AutoRequest<B::SendMediaGroup>; type SendLocation = AutoRequest<B::SendLocation>; type EditMessageLiveLocation = AutoRequest<B::EditMessageLiveLocation>; type EditMessageLiveLocationInline = AutoRequest<B::EditMessageLiveLocationInline>; type StopMessageLiveLocation = AutoRequest<B::StopMessageLiveLocation>; type StopMessageLiveLocationInline = AutoRequest<B::StopMessageLiveLocationInline>; type SendVenue = AutoRequest<B::SendVenue>; type SendContact = AutoRequest<B::SendContact>; type SendPoll = AutoRequest<B::SendPoll>; type SendDice = AutoRequest<B::SendDice>; type SendChatAction = AutoRequest<B::SendChatAction>; type GetUserProfilePhotos = AutoRequest<B::GetUserProfilePhotos>; type GetFile = AutoRequest<B::GetFile>; type KickChatMember = AutoRequest<B::KickChatMember>; type BanChatMember = AutoRequest<B::BanChatMember>; type UnbanChatMember = AutoRequest<B::UnbanChatMember>; type RestrictChatMember = AutoRequest<B::RestrictChatMember>; type PromoteChatMember = AutoRequest<B::PromoteChatMember>; type SetChatAdministratorCustomTitle = AutoRequest<B::SetChatAdministratorCustomTitle>; type BanChatSenderChat = AutoRequest<B::BanChatSenderChat>; type UnbanChatSenderChat = AutoRequest<B::UnbanChatSenderChat>; type SetChatPermissions = AutoRequest<B::SetChatPermissions>; type ExportChatInviteLink = AutoRequest<B::ExportChatInviteLink>; type CreateChatInviteLink = AutoRequest<B::CreateChatInviteLink>; type EditChatInviteLink = AutoRequest<B::EditChatInviteLink>; type RevokeChatInviteLink = AutoRequest<B::RevokeChatInviteLink>; type SetChatPhoto = AutoRequest<B::SetChatPhoto>; type DeleteChatPhoto = AutoRequest<B::DeleteChatPhoto>; type SetChatTitle = AutoRequest<B::SetChatTitle>; type SetChatDescription = AutoRequest<B::SetChatDescription>; type PinChatMessage = AutoRequest<B::PinChatMessage>; type UnpinChatMessage = AutoRequest<B::UnpinChatMessage>; type UnpinAllChatMessages = AutoRequest<B::UnpinAllChatMessages>; type LeaveChat = AutoRequest<B::LeaveChat>; type GetChat = AutoRequest<B::GetChat>; type GetChatAdministrators = AutoRequest<B::GetChatAdministrators>; type GetChatMembersCount = AutoRequest<B::GetChatMembersCount>; type GetChatMemberCount = AutoRequest<B::GetChatMemberCount>; type GetChatMember = AutoRequest<B::GetChatMember>; type SetChatStickerSet = AutoRequest<B::SetChatStickerSet>; type DeleteChatStickerSet = AutoRequest<B::DeleteChatStickerSet>; type AnswerCallbackQuery = AutoRequest<B::AnswerCallbackQuery>; type SetMyCommands = AutoRequest<B::SetMyCommands>; type GetMyCommands = AutoRequest<B::GetMyCommands>; type SetChatMenuButton = AutoRequest<B::SetChatMenuButton>; type GetChatMenuButton = AutoRequest<B::GetChatMenuButton>; type SetMyDefaultAdministratorRights = AutoRequest<B::SetMyDefaultAdministratorRights>; type GetMyDefaultAdministratorRights = AutoRequest<B::GetMyDefaultAdministratorRights>; type DeleteMyCommands = AutoRequest<B::DeleteMyCommands>; type AnswerInlineQuery = AutoRequest<B::AnswerInlineQuery>; type AnswerWebAppQuery = AutoRequest<B::AnswerWebAppQuery>; type EditMessageText = AutoRequest<B::EditMessageText>; type EditMessageTextInline = AutoRequest<B::EditMessageTextInline>; type EditMessageCaption = AutoRequest<B::EditMessageCaption>; type EditMessageCaptionInline = AutoRequest<B::EditMessageCaptionInline>; type EditMessageMedia = AutoRequest<B::EditMessageMedia>; type EditMessageMediaInline = AutoRequest<B::EditMessageMediaInline>; type EditMessageReplyMarkup = AutoRequest<B::EditMessageReplyMarkup>; type EditMessageReplyMarkupInline = AutoRequest<B::EditMessageReplyMarkupInline>; type StopPoll = AutoRequest<B::StopPoll>; type DeleteMessage = AutoRequest<B::DeleteMessage>; type SendSticker = AutoRequest<B::SendSticker>; type GetStickerSet = AutoRequest<B::GetStickerSet>; type GetCustomEmojiStickers = AutoRequest<B::GetCustomEmojiStickers>; type UploadStickerFile = AutoRequest<B::UploadStickerFile>; type CreateNewStickerSet = AutoRequest<B::CreateNewStickerSet>; type AddStickerToSet = AutoRequest<B::AddStickerToSet>; type SetStickerPositionInSet = AutoRequest<B::SetStickerPositionInSet>; type DeleteStickerFromSet = AutoRequest<B::DeleteStickerFromSet>; type SetStickerSetThumb = AutoRequest<B::SetStickerSetThumb>; type SendInvoice = AutoRequest<B::SendInvoice>; type CreateInvoiceLink = AutoRequest<B::CreateInvoiceLink>; type AnswerShippingQuery = AutoRequest<B::AnswerShippingQuery>; type AnswerPreCheckoutQuery = AutoRequest<B::AnswerPreCheckoutQuery>; type SetPassportDataErrors = AutoRequest<B::SetPassportDataErrors>; type SendGame = AutoRequest<B::SendGame>; type SetGameScore = AutoRequest<B::SetGameScore>; type SetGameScoreInline = AutoRequest<B::SetGameScoreInline>; type GetGameHighScores = AutoRequest<B::GetGameHighScores>; type ApproveChatJoinRequest = AutoRequest<B::ApproveChatJoinRequest>; type DeclineChatJoinRequest = AutoRequest<B::DeclineChatJoinRequest>;
where
Self: Sized,
{ ... }
fn erase<'a>(self) -> ErasedRequester<'a, Self::Err>ⓘNotable traits for ErasedRequester<'a, Err>impl<'a, Err> Requester for ErasedRequester<'a, Err>where
Err: Error + Send, type Err = Err; type GetMe = ErasedRequest<'a, GetMe, Err>; type LogOut = ErasedRequest<'a, LogOut, Err>; type Close = ErasedRequest<'a, Close, Err>; type GetUpdates = ErasedRequest<'a, GetUpdates, Err>; type SetWebhook = ErasedRequest<'a, SetWebhook, Err>; type DeleteWebhook = ErasedRequest<'a, DeleteWebhook, Err>; type GetWebhookInfo = ErasedRequest<'a, GetWebhookInfo, Err>; type ForwardMessage = ErasedRequest<'a, ForwardMessage, Err>; type CopyMessage = ErasedRequest<'a, CopyMessage, Err>; type SendMessage = ErasedRequest<'a, SendMessage, Err>; type SendPhoto = ErasedRequest<'a, SendPhoto, Err>; type SendAudio = ErasedRequest<'a, SendAudio, Err>; type SendDocument = ErasedRequest<'a, SendDocument, Err>; type SendVideo = ErasedRequest<'a, SendVideo, Err>; type SendAnimation = ErasedRequest<'a, SendAnimation, Err>; type SendVoice = ErasedRequest<'a, SendVoice, Err>; type SendVideoNote = ErasedRequest<'a, SendVideoNote, Err>; type SendMediaGroup = ErasedRequest<'a, SendMediaGroup, Err>; type SendLocation = ErasedRequest<'a, SendLocation, Err>; type EditMessageLiveLocation = ErasedRequest<'a, EditMessageLiveLocation, Err>; type EditMessageLiveLocationInline = ErasedRequest<'a, EditMessageLiveLocationInline, Err>; type StopMessageLiveLocation = ErasedRequest<'a, StopMessageLiveLocation, Err>; type StopMessageLiveLocationInline = ErasedRequest<'a, StopMessageLiveLocationInline, Err>; type SendVenue = ErasedRequest<'a, SendVenue, Err>; type SendContact = ErasedRequest<'a, SendContact, Err>; type SendPoll = ErasedRequest<'a, SendPoll, Err>; type SendDice = ErasedRequest<'a, SendDice, Err>; type SendChatAction = ErasedRequest<'a, SendChatAction, Err>; type GetUserProfilePhotos = ErasedRequest<'a, GetUserProfilePhotos, Err>; type GetFile = ErasedRequest<'a, GetFile, Err>; type KickChatMember = ErasedRequest<'a, KickChatMember, Err>; type BanChatMember = ErasedRequest<'a, BanChatMember, Err>; type UnbanChatMember = ErasedRequest<'a, UnbanChatMember, Err>; type RestrictChatMember = ErasedRequest<'a, RestrictChatMember, Err>; type PromoteChatMember = ErasedRequest<'a, PromoteChatMember, Err>; type SetChatAdministratorCustomTitle = ErasedRequest<'a, SetChatAdministratorCustomTitle, Err>; type BanChatSenderChat = ErasedRequest<'a, BanChatSenderChat, Err>; type UnbanChatSenderChat = ErasedRequest<'a, UnbanChatSenderChat, Err>; type SetChatPermissions = ErasedRequest<'a, SetChatPermissions, Err>; type ExportChatInviteLink = ErasedRequest<'a, ExportChatInviteLink, Err>; type CreateChatInviteLink = ErasedRequest<'a, CreateChatInviteLink, Err>; type EditChatInviteLink = ErasedRequest<'a, EditChatInviteLink, Err>; type RevokeChatInviteLink = ErasedRequest<'a, RevokeChatInviteLink, Err>; type SetChatPhoto = ErasedRequest<'a, SetChatPhoto, Err>; type DeleteChatPhoto = ErasedRequest<'a, DeleteChatPhoto, Err>; type SetChatTitle = ErasedRequest<'a, SetChatTitle, Err>; type SetChatDescription = ErasedRequest<'a, SetChatDescription, Err>; type PinChatMessage = ErasedRequest<'a, PinChatMessage, Err>; type UnpinChatMessage = ErasedRequest<'a, UnpinChatMessage, Err>; type UnpinAllChatMessages = ErasedRequest<'a, UnpinAllChatMessages, Err>; type LeaveChat = ErasedRequest<'a, LeaveChat, Err>; type GetChat = ErasedRequest<'a, GetChat, Err>; type GetChatAdministrators = ErasedRequest<'a, GetChatAdministrators, Err>; type GetChatMembersCount = ErasedRequest<'a, GetChatMembersCount, Err>; type GetChatMemberCount = ErasedRequest<'a, GetChatMemberCount, Err>; type GetChatMember = ErasedRequest<'a, GetChatMember, Err>; type SetChatStickerSet = ErasedRequest<'a, SetChatStickerSet, Err>; type DeleteChatStickerSet = ErasedRequest<'a, DeleteChatStickerSet, Err>; type AnswerCallbackQuery = ErasedRequest<'a, AnswerCallbackQuery, Err>; type SetMyCommands = ErasedRequest<'a, SetMyCommands, Err>; type GetMyCommands = ErasedRequest<'a, GetMyCommands, Err>; type SetChatMenuButton = ErasedRequest<'a, SetChatMenuButton, Err>; type GetChatMenuButton = ErasedRequest<'a, GetChatMenuButton, Err>; type SetMyDefaultAdministratorRights = ErasedRequest<'a, SetMyDefaultAdministratorRights, Err>; type GetMyDefaultAdministratorRights = ErasedRequest<'a, GetMyDefaultAdministratorRights, Err>; type DeleteMyCommands = ErasedRequest<'a, DeleteMyCommands, Err>; type AnswerInlineQuery = ErasedRequest<'a, AnswerInlineQuery, Err>; type AnswerWebAppQuery = ErasedRequest<'a, AnswerWebAppQuery, Err>; type EditMessageText = ErasedRequest<'a, EditMessageText, Err>; type EditMessageTextInline = ErasedRequest<'a, EditMessageTextInline, Err>; type EditMessageCaption = ErasedRequest<'a, EditMessageCaption, Err>; type EditMessageCaptionInline = ErasedRequest<'a, EditMessageCaptionInline, Err>; type EditMessageMedia = ErasedRequest<'a, EditMessageMedia, Err>; type EditMessageMediaInline = ErasedRequest<'a, EditMessageMediaInline, Err>; type EditMessageReplyMarkup = ErasedRequest<'a, EditMessageReplyMarkup, Err>; type EditMessageReplyMarkupInline = ErasedRequest<'a, EditMessageReplyMarkupInline, Err>; type StopPoll = ErasedRequest<'a, StopPoll, Err>; type DeleteMessage = ErasedRequest<'a, DeleteMessage, Err>; type SendSticker = ErasedRequest<'a, SendSticker, Err>; type GetStickerSet = ErasedRequest<'a, GetStickerSet, Err>; type GetCustomEmojiStickers = ErasedRequest<'a, GetCustomEmojiStickers, Err>; type UploadStickerFile = ErasedRequest<'a, UploadStickerFile, Err>; type CreateNewStickerSet = ErasedRequest<'a, CreateNewStickerSet, Err>; type AddStickerToSet = ErasedRequest<'a, AddStickerToSet, Err>; type SetStickerPositionInSet = ErasedRequest<'a, SetStickerPositionInSet, Err>; type DeleteStickerFromSet = ErasedRequest<'a, DeleteStickerFromSet, Err>; type SetStickerSetThumb = ErasedRequest<'a, SetStickerSetThumb, Err>; type SendInvoice = ErasedRequest<'a, SendInvoice, Err>; type CreateInvoiceLink = ErasedRequest<'a, CreateInvoiceLink, Err>; type AnswerShippingQuery = ErasedRequest<'a, AnswerShippingQuery, Err>; type AnswerPreCheckoutQuery = ErasedRequest<'a, AnswerPreCheckoutQuery, Err>; type SetPassportDataErrors = ErasedRequest<'a, SetPassportDataErrors, Err>; type SendGame = ErasedRequest<'a, SendGame, Err>; type SetGameScore = ErasedRequest<'a, SetGameScore, Err>; type SetGameScoreInline = ErasedRequest<'a, SetGameScoreInline, Err>; type GetGameHighScores = ErasedRequest<'a, GetGameHighScores, Err>; type ApproveChatJoinRequest = ErasedRequest<'a, ApproveChatJoinRequest, Err>; type DeclineChatJoinRequest = ErasedRequest<'a, DeclineChatJoinRequest, Err>;
where
Self: 'a,
Self: Sized,
{ ... }
fn trace(self, settings: Settings) -> Trace<Self>ⓘNotable traits for Trace<B>impl<B> Requester for Trace<B>where
B: Requester, type Err = B::Err; type GetMe = TraceRequest<B::GetMe>; type LogOut = TraceRequest<B::LogOut>; type Close = TraceRequest<B::Close>; type GetUpdates = TraceRequest<B::GetUpdates>; type SetWebhook = TraceRequest<B::SetWebhook>; type DeleteWebhook = TraceRequest<B::DeleteWebhook>; type GetWebhookInfo = TraceRequest<B::GetWebhookInfo>; type ForwardMessage = TraceRequest<B::ForwardMessage>; type CopyMessage = TraceRequest<B::CopyMessage>; type SendMessage = TraceRequest<B::SendMessage>; type SendPhoto = TraceRequest<B::SendPhoto>; type SendAudio = TraceRequest<B::SendAudio>; type SendDocument = TraceRequest<B::SendDocument>; type SendVideo = TraceRequest<B::SendVideo>; type SendAnimation = TraceRequest<B::SendAnimation>; type SendVoice = TraceRequest<B::SendVoice>; type SendVideoNote = TraceRequest<B::SendVideoNote>; type SendMediaGroup = TraceRequest<B::SendMediaGroup>; type SendLocation = TraceRequest<B::SendLocation>; type EditMessageLiveLocation = TraceRequest<B::EditMessageLiveLocation>; type EditMessageLiveLocationInline = TraceRequest<B::EditMessageLiveLocationInline>; type StopMessageLiveLocation = TraceRequest<B::StopMessageLiveLocation>; type StopMessageLiveLocationInline = TraceRequest<B::StopMessageLiveLocationInline>; type SendVenue = TraceRequest<B::SendVenue>; type SendContact = TraceRequest<B::SendContact>; type SendPoll = TraceRequest<B::SendPoll>; type SendDice = TraceRequest<B::SendDice>; type SendChatAction = TraceRequest<B::SendChatAction>; type GetUserProfilePhotos = TraceRequest<B::GetUserProfilePhotos>; type GetFile = TraceRequest<B::GetFile>; type KickChatMember = TraceRequest<B::KickChatMember>; type BanChatMember = TraceRequest<B::BanChatMember>; type UnbanChatMember = TraceRequest<B::UnbanChatMember>; type RestrictChatMember = TraceRequest<B::RestrictChatMember>; type PromoteChatMember = TraceRequest<B::PromoteChatMember>; type SetChatAdministratorCustomTitle = TraceRequest<B::SetChatAdministratorCustomTitle>; type BanChatSenderChat = TraceRequest<B::BanChatSenderChat>; type UnbanChatSenderChat = TraceRequest<B::UnbanChatSenderChat>; type SetChatPermissions = TraceRequest<B::SetChatPermissions>; type ExportChatInviteLink = TraceRequest<B::ExportChatInviteLink>; type CreateChatInviteLink = TraceRequest<B::CreateChatInviteLink>; type EditChatInviteLink = TraceRequest<B::EditChatInviteLink>; type RevokeChatInviteLink = TraceRequest<B::RevokeChatInviteLink>; type SetChatPhoto = TraceRequest<B::SetChatPhoto>; type DeleteChatPhoto = TraceRequest<B::DeleteChatPhoto>; type SetChatTitle = TraceRequest<B::SetChatTitle>; type SetChatDescription = TraceRequest<B::SetChatDescription>; type PinChatMessage = TraceRequest<B::PinChatMessage>; type UnpinChatMessage = TraceRequest<B::UnpinChatMessage>; type UnpinAllChatMessages = TraceRequest<B::UnpinAllChatMessages>; type LeaveChat = TraceRequest<B::LeaveChat>; type GetChat = TraceRequest<B::GetChat>; type GetChatAdministrators = TraceRequest<B::GetChatAdministrators>; type GetChatMembersCount = TraceRequest<B::GetChatMembersCount>; type GetChatMemberCount = TraceRequest<B::GetChatMemberCount>; type GetChatMember = TraceRequest<B::GetChatMember>; type SetChatStickerSet = TraceRequest<B::SetChatStickerSet>; type DeleteChatStickerSet = TraceRequest<B::DeleteChatStickerSet>; type AnswerCallbackQuery = TraceRequest<B::AnswerCallbackQuery>; type SetMyCommands = TraceRequest<B::SetMyCommands>; type GetMyCommands = TraceRequest<B::GetMyCommands>; type SetChatMenuButton = TraceRequest<B::SetChatMenuButton>; type GetChatMenuButton = TraceRequest<B::GetChatMenuButton>; type SetMyDefaultAdministratorRights = TraceRequest<B::SetMyDefaultAdministratorRights>; type GetMyDefaultAdministratorRights = TraceRequest<B::GetMyDefaultAdministratorRights>; type DeleteMyCommands = TraceRequest<B::DeleteMyCommands>; type AnswerInlineQuery = TraceRequest<B::AnswerInlineQuery>; type AnswerWebAppQuery = TraceRequest<B::AnswerWebAppQuery>; type EditMessageText = TraceRequest<B::EditMessageText>; type EditMessageTextInline = TraceRequest<B::EditMessageTextInline>; type EditMessageCaption = TraceRequest<B::EditMessageCaption>; type EditMessageCaptionInline = TraceRequest<B::EditMessageCaptionInline>; type EditMessageMedia = TraceRequest<B::EditMessageMedia>; type EditMessageMediaInline = TraceRequest<B::EditMessageMediaInline>; type EditMessageReplyMarkup = TraceRequest<B::EditMessageReplyMarkup>; type EditMessageReplyMarkupInline = TraceRequest<B::EditMessageReplyMarkupInline>; type StopPoll = TraceRequest<B::StopPoll>; type DeleteMessage = TraceRequest<B::DeleteMessage>; type SendSticker = TraceRequest<B::SendSticker>; type GetStickerSet = TraceRequest<B::GetStickerSet>; type GetCustomEmojiStickers = TraceRequest<B::GetCustomEmojiStickers>; type UploadStickerFile = TraceRequest<B::UploadStickerFile>; type CreateNewStickerSet = TraceRequest<B::CreateNewStickerSet>; type AddStickerToSet = TraceRequest<B::AddStickerToSet>; type SetStickerPositionInSet = TraceRequest<B::SetStickerPositionInSet>; type DeleteStickerFromSet = TraceRequest<B::DeleteStickerFromSet>; type SetStickerSetThumb = TraceRequest<B::SetStickerSetThumb>; type SendInvoice = TraceRequest<B::SendInvoice>; type CreateInvoiceLink = TraceRequest<B::CreateInvoiceLink>; type AnswerShippingQuery = TraceRequest<B::AnswerShippingQuery>; type AnswerPreCheckoutQuery = TraceRequest<B::AnswerPreCheckoutQuery>; type SetPassportDataErrors = TraceRequest<B::SetPassportDataErrors>; type SendGame = TraceRequest<B::SendGame>; type SetGameScore = TraceRequest<B::SetGameScore>; type SetGameScoreInline = TraceRequest<B::SetGameScoreInline>; type GetGameHighScores = TraceRequest<B::GetGameHighScores>; type ApproveChatJoinRequest = TraceRequest<B::ApproveChatJoinRequest>; type DeclineChatJoinRequest = TraceRequest<B::DeclineChatJoinRequest>;
where
Self: Sized,
{ ... }
fn throttle(self, limits: Limits) -> Throttle<Self>ⓘNotable traits for Throttle<B>impl<B: Requester> Requester for Throttle<B>where
B::Err: AsResponseParameters,
B::SendMessage: Clone + Send + Sync + 'static,
B::ForwardMessage: Clone + Send + Sync + 'static,
B::CopyMessage: Clone + Send + Sync + 'static,
B::SendPhoto: Clone + Send + Sync + 'static,
B::SendAudio: Clone + Send + Sync + 'static,
B::SendDocument: Clone + Send + Sync + 'static,
B::SendVideo: Clone + Send + Sync + 'static,
B::SendAnimation: Clone + Send + Sync + 'static,
B::SendVoice: Clone + Send + Sync + 'static,
B::SendVideoNote: Clone + Send + Sync + 'static,
B::SendMediaGroup: Clone + Send + Sync + 'static,
B::SendLocation: Clone + Send + Sync + 'static,
B::SendVenue: Clone + Send + Sync + 'static,
B::SendContact: Clone + Send + Sync + 'static,
B::SendPoll: Clone + Send + Sync + 'static,
B::SendDice: Clone + Send + Sync + 'static,
B::SendSticker: Clone + Send + Sync + 'static,
B::SendInvoice: Clone + Send + Sync + 'static, type Err = B::Err; type SendMessage = ThrottlingRequest<B::SendMessage>; type ForwardMessage = ThrottlingRequest<B::ForwardMessage>; type CopyMessage = ThrottlingRequest<B::CopyMessage>; type SendPhoto = ThrottlingRequest<B::SendPhoto>; type SendAudio = ThrottlingRequest<B::SendAudio>; type SendDocument = ThrottlingRequest<B::SendDocument>; type SendVideo = ThrottlingRequest<B::SendVideo>; type SendAnimation = ThrottlingRequest<B::SendAnimation>; type SendVoice = ThrottlingRequest<B::SendVoice>; type SendVideoNote = ThrottlingRequest<B::SendVideoNote>; type SendMediaGroup = ThrottlingRequest<B::SendMediaGroup>; type SendLocation = ThrottlingRequest<B::SendLocation>; type SendVenue = ThrottlingRequest<B::SendVenue>; type SendContact = ThrottlingRequest<B::SendContact>; type SendPoll = ThrottlingRequest<B::SendPoll>; type SendDice = ThrottlingRequest<B::SendDice>; type SendSticker = ThrottlingRequest<B::SendSticker>; type SendInvoice = ThrottlingRequest<B::SendInvoice>; type GetMe = B::GetMe; type LogOut = B::LogOut; type Close = B::Close; type GetUpdates = B::GetUpdates; type SetWebhook = B::SetWebhook; type DeleteWebhook = B::DeleteWebhook; type GetWebhookInfo = B::GetWebhookInfo; type EditMessageLiveLocation = B::EditMessageLiveLocation; type EditMessageLiveLocationInline = B::EditMessageLiveLocationInline; type StopMessageLiveLocation = B::StopMessageLiveLocation; type StopMessageLiveLocationInline = B::StopMessageLiveLocationInline; type SendChatAction = B::SendChatAction; type GetUserProfilePhotos = B::GetUserProfilePhotos; type GetFile = B::GetFile; type KickChatMember = B::KickChatMember; type BanChatMember = B::BanChatMember; type UnbanChatMember = B::UnbanChatMember; type RestrictChatMember = B::RestrictChatMember; type PromoteChatMember = B::PromoteChatMember; type SetChatAdministratorCustomTitle = B::SetChatAdministratorCustomTitle; type BanChatSenderChat = B::BanChatSenderChat; type UnbanChatSenderChat = B::UnbanChatSenderChat; type SetChatPermissions = B::SetChatPermissions; type ExportChatInviteLink = B::ExportChatInviteLink; type CreateChatInviteLink = B::CreateChatInviteLink; type EditChatInviteLink = B::EditChatInviteLink; type RevokeChatInviteLink = B::RevokeChatInviteLink; type SetChatPhoto = B::SetChatPhoto; type DeleteChatPhoto = B::DeleteChatPhoto; type SetChatTitle = B::SetChatTitle; type SetChatDescription = B::SetChatDescription; type PinChatMessage = B::PinChatMessage; type UnpinChatMessage = B::UnpinChatMessage; type UnpinAllChatMessages = B::UnpinAllChatMessages; type LeaveChat = B::LeaveChat; type GetChat = B::GetChat; type GetChatAdministrators = B::GetChatAdministrators; type GetChatMembersCount = B::GetChatMembersCount; type GetChatMemberCount = B::GetChatMemberCount; type GetChatMember = B::GetChatMember; type SetChatStickerSet = B::SetChatStickerSet; type DeleteChatStickerSet = B::DeleteChatStickerSet; type AnswerCallbackQuery = B::AnswerCallbackQuery; type SetMyCommands = B::SetMyCommands; type GetMyCommands = B::GetMyCommands; type SetChatMenuButton = B::SetChatMenuButton; type GetChatMenuButton = B::GetChatMenuButton; type SetMyDefaultAdministratorRights = B::SetMyDefaultAdministratorRights; type GetMyDefaultAdministratorRights = B::GetMyDefaultAdministratorRights; type DeleteMyCommands = B::DeleteMyCommands; type AnswerInlineQuery = B::AnswerInlineQuery; type AnswerWebAppQuery = B::AnswerWebAppQuery; type EditMessageText = B::EditMessageText; type EditMessageTextInline = B::EditMessageTextInline; type EditMessageCaption = B::EditMessageCaption; type EditMessageCaptionInline = B::EditMessageCaptionInline; type EditMessageMedia = B::EditMessageMedia; type EditMessageMediaInline = B::EditMessageMediaInline; type EditMessageReplyMarkup = B::EditMessageReplyMarkup; type EditMessageReplyMarkupInline = B::EditMessageReplyMarkupInline; type StopPoll = B::StopPoll; type DeleteMessage = B::DeleteMessage; type GetStickerSet = B::GetStickerSet; type GetCustomEmojiStickers = B::GetCustomEmojiStickers; type UploadStickerFile = B::UploadStickerFile; type CreateNewStickerSet = B::CreateNewStickerSet; type AddStickerToSet = B::AddStickerToSet; type SetStickerPositionInSet = B::SetStickerPositionInSet; type DeleteStickerFromSet = B::DeleteStickerFromSet; type SetStickerSetThumb = B::SetStickerSetThumb; type AnswerShippingQuery = B::AnswerShippingQuery; type CreateInvoiceLink = B::CreateInvoiceLink; type AnswerPreCheckoutQuery = B::AnswerPreCheckoutQuery; type SetPassportDataErrors = B::SetPassportDataErrors; type SendGame = B::SendGame; type SetGameScore = B::SetGameScore; type SetGameScoreInline = B::SetGameScoreInline; type ApproveChatJoinRequest = B::ApproveChatJoinRequest; type DeclineChatJoinRequest = B::DeclineChatJoinRequest; type GetGameHighScores = B::GetGameHighScores;
where
Self: Sized + Clone + Send + Sync + 'static,
Self::Err: AsResponseParameters,
Self::GetChat: Send,
{ ... }
fn parse_mode(self, parse_mode: ParseMode) -> DefaultParseMode<Self>ⓘNotable traits for DefaultParseMode<B>impl<B: Requester> Requester for DefaultParseMode<B> type Err = B::Err; type SendMessage = B::SendMessage; type SendPhoto = B::SendPhoto; type SendVideo = B::SendVideo; type SendAudio = B::SendAudio; type SendDocument = B::SendDocument; type SendAnimation = B::SendAnimation; type SendVoice = B::SendVoice; type EditMessageText = B::EditMessageText; type EditMessageTextInline = B::EditMessageTextInline; type EditMessageCaption = B::EditMessageCaption; type EditMessageCaptionInline = B::EditMessageCaptionInline; type SendPoll = B::SendPoll; type GetMe = B::GetMe; type LogOut = B::LogOut; type Close = B::Close; type GetUpdates = B::GetUpdates; type SetWebhook = B::SetWebhook; type DeleteWebhook = B::DeleteWebhook; type GetWebhookInfo = B::GetWebhookInfo; type ForwardMessage = B::ForwardMessage; type CopyMessage = B::CopyMessage; type SendVideoNote = B::SendVideoNote; type SendMediaGroup = B::SendMediaGroup; type SendLocation = B::SendLocation; type EditMessageLiveLocation = B::EditMessageLiveLocation; type EditMessageLiveLocationInline = B::EditMessageLiveLocationInline; type StopMessageLiveLocation = B::StopMessageLiveLocation; type StopMessageLiveLocationInline = B::StopMessageLiveLocationInline; type SendVenue = B::SendVenue; type SendContact = B::SendContact; type SendDice = B::SendDice; type SendChatAction = B::SendChatAction; type GetUserProfilePhotos = B::GetUserProfilePhotos; type GetFile = B::GetFile; type KickChatMember = B::KickChatMember; type BanChatMember = B::BanChatMember; type UnbanChatMember = B::UnbanChatMember; type RestrictChatMember = B::RestrictChatMember; type PromoteChatMember = B::PromoteChatMember; type SetChatAdministratorCustomTitle = B::SetChatAdministratorCustomTitle; type BanChatSenderChat = B::BanChatSenderChat; type UnbanChatSenderChat = B::UnbanChatSenderChat; type SetChatPermissions = B::SetChatPermissions; type ExportChatInviteLink = B::ExportChatInviteLink; type CreateChatInviteLink = B::CreateChatInviteLink; type EditChatInviteLink = B::EditChatInviteLink; type RevokeChatInviteLink = B::RevokeChatInviteLink; type SetChatPhoto = B::SetChatPhoto; type DeleteChatPhoto = B::DeleteChatPhoto; type SetChatTitle = B::SetChatTitle; type SetChatDescription = B::SetChatDescription; type PinChatMessage = B::PinChatMessage; type UnpinChatMessage = B::UnpinChatMessage; type UnpinAllChatMessages = B::UnpinAllChatMessages; type LeaveChat = B::LeaveChat; type GetChat = B::GetChat; type GetChatAdministrators = B::GetChatAdministrators; type GetChatMembersCount = B::GetChatMembersCount; type GetChatMemberCount = B::GetChatMemberCount; type GetChatMember = B::GetChatMember; type SetChatStickerSet = B::SetChatStickerSet; type DeleteChatStickerSet = B::DeleteChatStickerSet; type AnswerCallbackQuery = B::AnswerCallbackQuery; type SetMyCommands = B::SetMyCommands; type GetMyCommands = B::GetMyCommands; type SetChatMenuButton = B::SetChatMenuButton; type GetChatMenuButton = B::GetChatMenuButton; type SetMyDefaultAdministratorRights = B::SetMyDefaultAdministratorRights; type GetMyDefaultAdministratorRights = B::GetMyDefaultAdministratorRights; type DeleteMyCommands = B::DeleteMyCommands; type AnswerInlineQuery = B::AnswerInlineQuery; type AnswerWebAppQuery = B::AnswerWebAppQuery; type EditMessageMedia = B::EditMessageMedia; type EditMessageMediaInline = B::EditMessageMediaInline; type EditMessageReplyMarkup = B::EditMessageReplyMarkup; type EditMessageReplyMarkupInline = B::EditMessageReplyMarkupInline; type StopPoll = B::StopPoll; type DeleteMessage = B::DeleteMessage; type SendSticker = B::SendSticker; type GetStickerSet = B::GetStickerSet; type GetCustomEmojiStickers = B::GetCustomEmojiStickers; type UploadStickerFile = B::UploadStickerFile; type CreateNewStickerSet = B::CreateNewStickerSet; type AddStickerToSet = B::AddStickerToSet; type SetStickerPositionInSet = B::SetStickerPositionInSet; type DeleteStickerFromSet = B::DeleteStickerFromSet; type SetStickerSetThumb = B::SetStickerSetThumb; type SendInvoice = B::SendInvoice; type CreateInvoiceLink = B::CreateInvoiceLink; type AnswerShippingQuery = B::AnswerShippingQuery; type AnswerPreCheckoutQuery = B::AnswerPreCheckoutQuery; type SetPassportDataErrors = B::SetPassportDataErrors; type SendGame = B::SendGame; type SetGameScore = B::SetGameScore; type SetGameScoreInline = B::SetGameScoreInline; type GetGameHighScores = B::GetGameHighScores; type ApproveChatJoinRequest = B::ApproveChatJoinRequest; type DeclineChatJoinRequest = B::DeclineChatJoinRequest;
where
Self: Sized,
{ ... }
}Expand description
Extensions methods for Requester.
Provided Methods
sourcefn cache_me(self) -> CacheMe<Self>ⓘNotable traits for CacheMe<B>impl<B> Requester for CacheMe<B>where
B: Requester, type Err = B::Err; type GetMe = CachedMeRequest<B::GetMe>; type LogOut = B::LogOut; type Close = B::Close; type GetUpdates = B::GetUpdates; type SetWebhook = B::SetWebhook; type DeleteWebhook = B::DeleteWebhook; type GetWebhookInfo = B::GetWebhookInfo; type ForwardMessage = B::ForwardMessage; type CopyMessage = B::CopyMessage; type SendMessage = B::SendMessage; type SendPhoto = B::SendPhoto; type SendAudio = B::SendAudio; type SendDocument = B::SendDocument; type SendVideo = B::SendVideo; type SendAnimation = B::SendAnimation; type SendVoice = B::SendVoice; type SendVideoNote = B::SendVideoNote; type SendMediaGroup = B::SendMediaGroup; type SendLocation = B::SendLocation; type EditMessageLiveLocation = B::EditMessageLiveLocation; type EditMessageLiveLocationInline = B::EditMessageLiveLocationInline; type StopMessageLiveLocation = B::StopMessageLiveLocation; type StopMessageLiveLocationInline = B::StopMessageLiveLocationInline; type SendVenue = B::SendVenue; type SendContact = B::SendContact; type SendPoll = B::SendPoll; type SendDice = B::SendDice; type SendChatAction = B::SendChatAction; type GetUserProfilePhotos = B::GetUserProfilePhotos; type GetFile = B::GetFile; type KickChatMember = B::KickChatMember; type BanChatMember = B::BanChatMember; type UnbanChatMember = B::UnbanChatMember; type RestrictChatMember = B::RestrictChatMember; type PromoteChatMember = B::PromoteChatMember; type SetChatAdministratorCustomTitle = B::SetChatAdministratorCustomTitle; type BanChatSenderChat = B::BanChatSenderChat; type UnbanChatSenderChat = B::UnbanChatSenderChat; type SetChatPermissions = B::SetChatPermissions; type ExportChatInviteLink = B::ExportChatInviteLink; type CreateChatInviteLink = B::CreateChatInviteLink; type EditChatInviteLink = B::EditChatInviteLink; type RevokeChatInviteLink = B::RevokeChatInviteLink; type SetChatPhoto = B::SetChatPhoto; type DeleteChatPhoto = B::DeleteChatPhoto; type SetChatTitle = B::SetChatTitle; type SetChatDescription = B::SetChatDescription; type PinChatMessage = B::PinChatMessage; type UnpinChatMessage = B::UnpinChatMessage; type UnpinAllChatMessages = B::UnpinAllChatMessages; type LeaveChat = B::LeaveChat; type GetChat = B::GetChat; type GetChatAdministrators = B::GetChatAdministrators; type GetChatMembersCount = B::GetChatMembersCount; type GetChatMemberCount = B::GetChatMemberCount; type GetChatMember = B::GetChatMember; type SetChatStickerSet = B::SetChatStickerSet; type DeleteChatStickerSet = B::DeleteChatStickerSet; type AnswerCallbackQuery = B::AnswerCallbackQuery; type SetMyCommands = B::SetMyCommands; type GetMyCommands = B::GetMyCommands; type SetChatMenuButton = B::SetChatMenuButton; type GetChatMenuButton = B::GetChatMenuButton; type SetMyDefaultAdministratorRights = B::SetMyDefaultAdministratorRights; type GetMyDefaultAdministratorRights = B::GetMyDefaultAdministratorRights; type DeleteMyCommands = B::DeleteMyCommands; type AnswerInlineQuery = B::AnswerInlineQuery; type AnswerWebAppQuery = B::AnswerWebAppQuery; type EditMessageText = B::EditMessageText; type EditMessageTextInline = B::EditMessageTextInline; type EditMessageCaption = B::EditMessageCaption; type EditMessageCaptionInline = B::EditMessageCaptionInline; type EditMessageMedia = B::EditMessageMedia; type EditMessageMediaInline = B::EditMessageMediaInline; type EditMessageReplyMarkup = B::EditMessageReplyMarkup; type EditMessageReplyMarkupInline = B::EditMessageReplyMarkupInline; type StopPoll = B::StopPoll; type DeleteMessage = B::DeleteMessage; type SendSticker = B::SendSticker; type GetStickerSet = B::GetStickerSet; type GetCustomEmojiStickers = B::GetCustomEmojiStickers; type UploadStickerFile = B::UploadStickerFile; type CreateNewStickerSet = B::CreateNewStickerSet; type AddStickerToSet = B::AddStickerToSet; type SetStickerPositionInSet = B::SetStickerPositionInSet; type DeleteStickerFromSet = B::DeleteStickerFromSet; type SetStickerSetThumb = B::SetStickerSetThumb; type SendInvoice = B::SendInvoice; type CreateInvoiceLink = B::CreateInvoiceLink; type AnswerShippingQuery = B::AnswerShippingQuery; type AnswerPreCheckoutQuery = B::AnswerPreCheckoutQuery; type SetPassportDataErrors = B::SetPassportDataErrors; type SendGame = B::SendGame; type SetGameScore = B::SetGameScore; type SetGameScoreInline = B::SetGameScoreInline; type GetGameHighScores = B::GetGameHighScores; type ApproveChatJoinRequest = B::ApproveChatJoinRequest; type DeclineChatJoinRequest = B::DeclineChatJoinRequest;where
Self: Sized,
fn cache_me(self) -> CacheMe<Self>ⓘNotable traits for CacheMe<B>impl<B> Requester for CacheMe<B>where
B: Requester, type Err = B::Err; type GetMe = CachedMeRequest<B::GetMe>; type LogOut = B::LogOut; type Close = B::Close; type GetUpdates = B::GetUpdates; type SetWebhook = B::SetWebhook; type DeleteWebhook = B::DeleteWebhook; type GetWebhookInfo = B::GetWebhookInfo; type ForwardMessage = B::ForwardMessage; type CopyMessage = B::CopyMessage; type SendMessage = B::SendMessage; type SendPhoto = B::SendPhoto; type SendAudio = B::SendAudio; type SendDocument = B::SendDocument; type SendVideo = B::SendVideo; type SendAnimation = B::SendAnimation; type SendVoice = B::SendVoice; type SendVideoNote = B::SendVideoNote; type SendMediaGroup = B::SendMediaGroup; type SendLocation = B::SendLocation; type EditMessageLiveLocation = B::EditMessageLiveLocation; type EditMessageLiveLocationInline = B::EditMessageLiveLocationInline; type StopMessageLiveLocation = B::StopMessageLiveLocation; type StopMessageLiveLocationInline = B::StopMessageLiveLocationInline; type SendVenue = B::SendVenue; type SendContact = B::SendContact; type SendPoll = B::SendPoll; type SendDice = B::SendDice; type SendChatAction = B::SendChatAction; type GetUserProfilePhotos = B::GetUserProfilePhotos; type GetFile = B::GetFile; type KickChatMember = B::KickChatMember; type BanChatMember = B::BanChatMember; type UnbanChatMember = B::UnbanChatMember; type RestrictChatMember = B::RestrictChatMember; type PromoteChatMember = B::PromoteChatMember; type SetChatAdministratorCustomTitle = B::SetChatAdministratorCustomTitle; type BanChatSenderChat = B::BanChatSenderChat; type UnbanChatSenderChat = B::UnbanChatSenderChat; type SetChatPermissions = B::SetChatPermissions; type ExportChatInviteLink = B::ExportChatInviteLink; type CreateChatInviteLink = B::CreateChatInviteLink; type EditChatInviteLink = B::EditChatInviteLink; type RevokeChatInviteLink = B::RevokeChatInviteLink; type SetChatPhoto = B::SetChatPhoto; type DeleteChatPhoto = B::DeleteChatPhoto; type SetChatTitle = B::SetChatTitle; type SetChatDescription = B::SetChatDescription; type PinChatMessage = B::PinChatMessage; type UnpinChatMessage = B::UnpinChatMessage; type UnpinAllChatMessages = B::UnpinAllChatMessages; type LeaveChat = B::LeaveChat; type GetChat = B::GetChat; type GetChatAdministrators = B::GetChatAdministrators; type GetChatMembersCount = B::GetChatMembersCount; type GetChatMemberCount = B::GetChatMemberCount; type GetChatMember = B::GetChatMember; type SetChatStickerSet = B::SetChatStickerSet; type DeleteChatStickerSet = B::DeleteChatStickerSet; type AnswerCallbackQuery = B::AnswerCallbackQuery; type SetMyCommands = B::SetMyCommands; type GetMyCommands = B::GetMyCommands; type SetChatMenuButton = B::SetChatMenuButton; type GetChatMenuButton = B::GetChatMenuButton; type SetMyDefaultAdministratorRights = B::SetMyDefaultAdministratorRights; type GetMyDefaultAdministratorRights = B::GetMyDefaultAdministratorRights; type DeleteMyCommands = B::DeleteMyCommands; type AnswerInlineQuery = B::AnswerInlineQuery; type AnswerWebAppQuery = B::AnswerWebAppQuery; type EditMessageText = B::EditMessageText; type EditMessageTextInline = B::EditMessageTextInline; type EditMessageCaption = B::EditMessageCaption; type EditMessageCaptionInline = B::EditMessageCaptionInline; type EditMessageMedia = B::EditMessageMedia; type EditMessageMediaInline = B::EditMessageMediaInline; type EditMessageReplyMarkup = B::EditMessageReplyMarkup; type EditMessageReplyMarkupInline = B::EditMessageReplyMarkupInline; type StopPoll = B::StopPoll; type DeleteMessage = B::DeleteMessage; type SendSticker = B::SendSticker; type GetStickerSet = B::GetStickerSet; type GetCustomEmojiStickers = B::GetCustomEmojiStickers; type UploadStickerFile = B::UploadStickerFile; type CreateNewStickerSet = B::CreateNewStickerSet; type AddStickerToSet = B::AddStickerToSet; type SetStickerPositionInSet = B::SetStickerPositionInSet; type DeleteStickerFromSet = B::DeleteStickerFromSet; type SetStickerSetThumb = B::SetStickerSetThumb; type SendInvoice = B::SendInvoice; type CreateInvoiceLink = B::CreateInvoiceLink; type AnswerShippingQuery = B::AnswerShippingQuery; type AnswerPreCheckoutQuery = B::AnswerPreCheckoutQuery; type SetPassportDataErrors = B::SetPassportDataErrors; type SendGame = B::SendGame; type SetGameScore = B::SetGameScore; type SetGameScoreInline = B::SetGameScoreInline; type GetGameHighScores = B::GetGameHighScores; type ApproveChatJoinRequest = B::ApproveChatJoinRequest; type DeclineChatJoinRequest = B::DeclineChatJoinRequest;where
Self: Sized,
B: Requester, type Err = B::Err; type GetMe = CachedMeRequest<B::GetMe>; type LogOut = B::LogOut; type Close = B::Close; type GetUpdates = B::GetUpdates; type SetWebhook = B::SetWebhook; type DeleteWebhook = B::DeleteWebhook; type GetWebhookInfo = B::GetWebhookInfo; type ForwardMessage = B::ForwardMessage; type CopyMessage = B::CopyMessage; type SendMessage = B::SendMessage; type SendPhoto = B::SendPhoto; type SendAudio = B::SendAudio; type SendDocument = B::SendDocument; type SendVideo = B::SendVideo; type SendAnimation = B::SendAnimation; type SendVoice = B::SendVoice; type SendVideoNote = B::SendVideoNote; type SendMediaGroup = B::SendMediaGroup; type SendLocation = B::SendLocation; type EditMessageLiveLocation = B::EditMessageLiveLocation; type EditMessageLiveLocationInline = B::EditMessageLiveLocationInline; type StopMessageLiveLocation = B::StopMessageLiveLocation; type StopMessageLiveLocationInline = B::StopMessageLiveLocationInline; type SendVenue = B::SendVenue; type SendContact = B::SendContact; type SendPoll = B::SendPoll; type SendDice = B::SendDice; type SendChatAction = B::SendChatAction; type GetUserProfilePhotos = B::GetUserProfilePhotos; type GetFile = B::GetFile; type KickChatMember = B::KickChatMember; type BanChatMember = B::BanChatMember; type UnbanChatMember = B::UnbanChatMember; type RestrictChatMember = B::RestrictChatMember; type PromoteChatMember = B::PromoteChatMember; type SetChatAdministratorCustomTitle = B::SetChatAdministratorCustomTitle; type BanChatSenderChat = B::BanChatSenderChat; type UnbanChatSenderChat = B::UnbanChatSenderChat; type SetChatPermissions = B::SetChatPermissions; type ExportChatInviteLink = B::ExportChatInviteLink; type CreateChatInviteLink = B::CreateChatInviteLink; type EditChatInviteLink = B::EditChatInviteLink; type RevokeChatInviteLink = B::RevokeChatInviteLink; type SetChatPhoto = B::SetChatPhoto; type DeleteChatPhoto = B::DeleteChatPhoto; type SetChatTitle = B::SetChatTitle; type SetChatDescription = B::SetChatDescription; type PinChatMessage = B::PinChatMessage; type UnpinChatMessage = B::UnpinChatMessage; type UnpinAllChatMessages = B::UnpinAllChatMessages; type LeaveChat = B::LeaveChat; type GetChat = B::GetChat; type GetChatAdministrators = B::GetChatAdministrators; type GetChatMembersCount = B::GetChatMembersCount; type GetChatMemberCount = B::GetChatMemberCount; type GetChatMember = B::GetChatMember; type SetChatStickerSet = B::SetChatStickerSet; type DeleteChatStickerSet = B::DeleteChatStickerSet; type AnswerCallbackQuery = B::AnswerCallbackQuery; type SetMyCommands = B::SetMyCommands; type GetMyCommands = B::GetMyCommands; type SetChatMenuButton = B::SetChatMenuButton; type GetChatMenuButton = B::GetChatMenuButton; type SetMyDefaultAdministratorRights = B::SetMyDefaultAdministratorRights; type GetMyDefaultAdministratorRights = B::GetMyDefaultAdministratorRights; type DeleteMyCommands = B::DeleteMyCommands; type AnswerInlineQuery = B::AnswerInlineQuery; type AnswerWebAppQuery = B::AnswerWebAppQuery; type EditMessageText = B::EditMessageText; type EditMessageTextInline = B::EditMessageTextInline; type EditMessageCaption = B::EditMessageCaption; type EditMessageCaptionInline = B::EditMessageCaptionInline; type EditMessageMedia = B::EditMessageMedia; type EditMessageMediaInline = B::EditMessageMediaInline; type EditMessageReplyMarkup = B::EditMessageReplyMarkup; type EditMessageReplyMarkupInline = B::EditMessageReplyMarkupInline; type StopPoll = B::StopPoll; type DeleteMessage = B::DeleteMessage; type SendSticker = B::SendSticker; type GetStickerSet = B::GetStickerSet; type GetCustomEmojiStickers = B::GetCustomEmojiStickers; type UploadStickerFile = B::UploadStickerFile; type CreateNewStickerSet = B::CreateNewStickerSet; type AddStickerToSet = B::AddStickerToSet; type SetStickerPositionInSet = B::SetStickerPositionInSet; type DeleteStickerFromSet = B::DeleteStickerFromSet; type SetStickerSetThumb = B::SetStickerSetThumb; type SendInvoice = B::SendInvoice; type CreateInvoiceLink = B::CreateInvoiceLink; type AnswerShippingQuery = B::AnswerShippingQuery; type AnswerPreCheckoutQuery = B::AnswerPreCheckoutQuery; type SetPassportDataErrors = B::SetPassportDataErrors; type SendGame = B::SendGame; type SetGameScore = B::SetGameScore; type SetGameScoreInline = B::SetGameScoreInline; type GetGameHighScores = B::GetGameHighScores; type ApproveChatJoinRequest = B::ApproveChatJoinRequest; type DeclineChatJoinRequest = B::DeclineChatJoinRequest;
Available on crate feature
cache_me only.Add get_me caching ability, see CacheMe for more.
sourcefn auto_send(self) -> AutoSend<Self>ⓘNotable traits for AutoSend<B>impl<B> Requester for AutoSend<B>where
B: Requester, type Err = B::Err; type GetMe = AutoRequest<B::GetMe>; type LogOut = AutoRequest<B::LogOut>; type Close = AutoRequest<B::Close>; type GetUpdates = AutoRequest<B::GetUpdates>; type SetWebhook = AutoRequest<B::SetWebhook>; type DeleteWebhook = AutoRequest<B::DeleteWebhook>; type GetWebhookInfo = AutoRequest<B::GetWebhookInfo>; type ForwardMessage = AutoRequest<B::ForwardMessage>; type CopyMessage = AutoRequest<B::CopyMessage>; type SendMessage = AutoRequest<B::SendMessage>; type SendPhoto = AutoRequest<B::SendPhoto>; type SendAudio = AutoRequest<B::SendAudio>; type SendDocument = AutoRequest<B::SendDocument>; type SendVideo = AutoRequest<B::SendVideo>; type SendAnimation = AutoRequest<B::SendAnimation>; type SendVoice = AutoRequest<B::SendVoice>; type SendVideoNote = AutoRequest<B::SendVideoNote>; type SendMediaGroup = AutoRequest<B::SendMediaGroup>; type SendLocation = AutoRequest<B::SendLocation>; type EditMessageLiveLocation = AutoRequest<B::EditMessageLiveLocation>; type EditMessageLiveLocationInline = AutoRequest<B::EditMessageLiveLocationInline>; type StopMessageLiveLocation = AutoRequest<B::StopMessageLiveLocation>; type StopMessageLiveLocationInline = AutoRequest<B::StopMessageLiveLocationInline>; type SendVenue = AutoRequest<B::SendVenue>; type SendContact = AutoRequest<B::SendContact>; type SendPoll = AutoRequest<B::SendPoll>; type SendDice = AutoRequest<B::SendDice>; type SendChatAction = AutoRequest<B::SendChatAction>; type GetUserProfilePhotos = AutoRequest<B::GetUserProfilePhotos>; type GetFile = AutoRequest<B::GetFile>; type KickChatMember = AutoRequest<B::KickChatMember>; type BanChatMember = AutoRequest<B::BanChatMember>; type UnbanChatMember = AutoRequest<B::UnbanChatMember>; type RestrictChatMember = AutoRequest<B::RestrictChatMember>; type PromoteChatMember = AutoRequest<B::PromoteChatMember>; type SetChatAdministratorCustomTitle = AutoRequest<B::SetChatAdministratorCustomTitle>; type BanChatSenderChat = AutoRequest<B::BanChatSenderChat>; type UnbanChatSenderChat = AutoRequest<B::UnbanChatSenderChat>; type SetChatPermissions = AutoRequest<B::SetChatPermissions>; type ExportChatInviteLink = AutoRequest<B::ExportChatInviteLink>; type CreateChatInviteLink = AutoRequest<B::CreateChatInviteLink>; type EditChatInviteLink = AutoRequest<B::EditChatInviteLink>; type RevokeChatInviteLink = AutoRequest<B::RevokeChatInviteLink>; type SetChatPhoto = AutoRequest<B::SetChatPhoto>; type DeleteChatPhoto = AutoRequest<B::DeleteChatPhoto>; type SetChatTitle = AutoRequest<B::SetChatTitle>; type SetChatDescription = AutoRequest<B::SetChatDescription>; type PinChatMessage = AutoRequest<B::PinChatMessage>; type UnpinChatMessage = AutoRequest<B::UnpinChatMessage>; type UnpinAllChatMessages = AutoRequest<B::UnpinAllChatMessages>; type LeaveChat = AutoRequest<B::LeaveChat>; type GetChat = AutoRequest<B::GetChat>; type GetChatAdministrators = AutoRequest<B::GetChatAdministrators>; type GetChatMembersCount = AutoRequest<B::GetChatMembersCount>; type GetChatMemberCount = AutoRequest<B::GetChatMemberCount>; type GetChatMember = AutoRequest<B::GetChatMember>; type SetChatStickerSet = AutoRequest<B::SetChatStickerSet>; type DeleteChatStickerSet = AutoRequest<B::DeleteChatStickerSet>; type AnswerCallbackQuery = AutoRequest<B::AnswerCallbackQuery>; type SetMyCommands = AutoRequest<B::SetMyCommands>; type GetMyCommands = AutoRequest<B::GetMyCommands>; type SetChatMenuButton = AutoRequest<B::SetChatMenuButton>; type GetChatMenuButton = AutoRequest<B::GetChatMenuButton>; type SetMyDefaultAdministratorRights = AutoRequest<B::SetMyDefaultAdministratorRights>; type GetMyDefaultAdministratorRights = AutoRequest<B::GetMyDefaultAdministratorRights>; type DeleteMyCommands = AutoRequest<B::DeleteMyCommands>; type AnswerInlineQuery = AutoRequest<B::AnswerInlineQuery>; type AnswerWebAppQuery = AutoRequest<B::AnswerWebAppQuery>; type EditMessageText = AutoRequest<B::EditMessageText>; type EditMessageTextInline = AutoRequest<B::EditMessageTextInline>; type EditMessageCaption = AutoRequest<B::EditMessageCaption>; type EditMessageCaptionInline = AutoRequest<B::EditMessageCaptionInline>; type EditMessageMedia = AutoRequest<B::EditMessageMedia>; type EditMessageMediaInline = AutoRequest<B::EditMessageMediaInline>; type EditMessageReplyMarkup = AutoRequest<B::EditMessageReplyMarkup>; type EditMessageReplyMarkupInline = AutoRequest<B::EditMessageReplyMarkupInline>; type StopPoll = AutoRequest<B::StopPoll>; type DeleteMessage = AutoRequest<B::DeleteMessage>; type SendSticker = AutoRequest<B::SendSticker>; type GetStickerSet = AutoRequest<B::GetStickerSet>; type GetCustomEmojiStickers = AutoRequest<B::GetCustomEmojiStickers>; type UploadStickerFile = AutoRequest<B::UploadStickerFile>; type CreateNewStickerSet = AutoRequest<B::CreateNewStickerSet>; type AddStickerToSet = AutoRequest<B::AddStickerToSet>; type SetStickerPositionInSet = AutoRequest<B::SetStickerPositionInSet>; type DeleteStickerFromSet = AutoRequest<B::DeleteStickerFromSet>; type SetStickerSetThumb = AutoRequest<B::SetStickerSetThumb>; type SendInvoice = AutoRequest<B::SendInvoice>; type CreateInvoiceLink = AutoRequest<B::CreateInvoiceLink>; type AnswerShippingQuery = AutoRequest<B::AnswerShippingQuery>; type AnswerPreCheckoutQuery = AutoRequest<B::AnswerPreCheckoutQuery>; type SetPassportDataErrors = AutoRequest<B::SetPassportDataErrors>; type SendGame = AutoRequest<B::SendGame>; type SetGameScore = AutoRequest<B::SetGameScore>; type SetGameScoreInline = AutoRequest<B::SetGameScoreInline>; type GetGameHighScores = AutoRequest<B::GetGameHighScores>; type ApproveChatJoinRequest = AutoRequest<B::ApproveChatJoinRequest>; type DeclineChatJoinRequest = AutoRequest<B::DeclineChatJoinRequest>;where
Self: Sized,
fn auto_send(self) -> AutoSend<Self>ⓘNotable traits for AutoSend<B>impl<B> Requester for AutoSend<B>where
B: Requester, type Err = B::Err; type GetMe = AutoRequest<B::GetMe>; type LogOut = AutoRequest<B::LogOut>; type Close = AutoRequest<B::Close>; type GetUpdates = AutoRequest<B::GetUpdates>; type SetWebhook = AutoRequest<B::SetWebhook>; type DeleteWebhook = AutoRequest<B::DeleteWebhook>; type GetWebhookInfo = AutoRequest<B::GetWebhookInfo>; type ForwardMessage = AutoRequest<B::ForwardMessage>; type CopyMessage = AutoRequest<B::CopyMessage>; type SendMessage = AutoRequest<B::SendMessage>; type SendPhoto = AutoRequest<B::SendPhoto>; type SendAudio = AutoRequest<B::SendAudio>; type SendDocument = AutoRequest<B::SendDocument>; type SendVideo = AutoRequest<B::SendVideo>; type SendAnimation = AutoRequest<B::SendAnimation>; type SendVoice = AutoRequest<B::SendVoice>; type SendVideoNote = AutoRequest<B::SendVideoNote>; type SendMediaGroup = AutoRequest<B::SendMediaGroup>; type SendLocation = AutoRequest<B::SendLocation>; type EditMessageLiveLocation = AutoRequest<B::EditMessageLiveLocation>; type EditMessageLiveLocationInline = AutoRequest<B::EditMessageLiveLocationInline>; type StopMessageLiveLocation = AutoRequest<B::StopMessageLiveLocation>; type StopMessageLiveLocationInline = AutoRequest<B::StopMessageLiveLocationInline>; type SendVenue = AutoRequest<B::SendVenue>; type SendContact = AutoRequest<B::SendContact>; type SendPoll = AutoRequest<B::SendPoll>; type SendDice = AutoRequest<B::SendDice>; type SendChatAction = AutoRequest<B::SendChatAction>; type GetUserProfilePhotos = AutoRequest<B::GetUserProfilePhotos>; type GetFile = AutoRequest<B::GetFile>; type KickChatMember = AutoRequest<B::KickChatMember>; type BanChatMember = AutoRequest<B::BanChatMember>; type UnbanChatMember = AutoRequest<B::UnbanChatMember>; type RestrictChatMember = AutoRequest<B::RestrictChatMember>; type PromoteChatMember = AutoRequest<B::PromoteChatMember>; type SetChatAdministratorCustomTitle = AutoRequest<B::SetChatAdministratorCustomTitle>; type BanChatSenderChat = AutoRequest<B::BanChatSenderChat>; type UnbanChatSenderChat = AutoRequest<B::UnbanChatSenderChat>; type SetChatPermissions = AutoRequest<B::SetChatPermissions>; type ExportChatInviteLink = AutoRequest<B::ExportChatInviteLink>; type CreateChatInviteLink = AutoRequest<B::CreateChatInviteLink>; type EditChatInviteLink = AutoRequest<B::EditChatInviteLink>; type RevokeChatInviteLink = AutoRequest<B::RevokeChatInviteLink>; type SetChatPhoto = AutoRequest<B::SetChatPhoto>; type DeleteChatPhoto = AutoRequest<B::DeleteChatPhoto>; type SetChatTitle = AutoRequest<B::SetChatTitle>; type SetChatDescription = AutoRequest<B::SetChatDescription>; type PinChatMessage = AutoRequest<B::PinChatMessage>; type UnpinChatMessage = AutoRequest<B::UnpinChatMessage>; type UnpinAllChatMessages = AutoRequest<B::UnpinAllChatMessages>; type LeaveChat = AutoRequest<B::LeaveChat>; type GetChat = AutoRequest<B::GetChat>; type GetChatAdministrators = AutoRequest<B::GetChatAdministrators>; type GetChatMembersCount = AutoRequest<B::GetChatMembersCount>; type GetChatMemberCount = AutoRequest<B::GetChatMemberCount>; type GetChatMember = AutoRequest<B::GetChatMember>; type SetChatStickerSet = AutoRequest<B::SetChatStickerSet>; type DeleteChatStickerSet = AutoRequest<B::DeleteChatStickerSet>; type AnswerCallbackQuery = AutoRequest<B::AnswerCallbackQuery>; type SetMyCommands = AutoRequest<B::SetMyCommands>; type GetMyCommands = AutoRequest<B::GetMyCommands>; type SetChatMenuButton = AutoRequest<B::SetChatMenuButton>; type GetChatMenuButton = AutoRequest<B::GetChatMenuButton>; type SetMyDefaultAdministratorRights = AutoRequest<B::SetMyDefaultAdministratorRights>; type GetMyDefaultAdministratorRights = AutoRequest<B::GetMyDefaultAdministratorRights>; type DeleteMyCommands = AutoRequest<B::DeleteMyCommands>; type AnswerInlineQuery = AutoRequest<B::AnswerInlineQuery>; type AnswerWebAppQuery = AutoRequest<B::AnswerWebAppQuery>; type EditMessageText = AutoRequest<B::EditMessageText>; type EditMessageTextInline = AutoRequest<B::EditMessageTextInline>; type EditMessageCaption = AutoRequest<B::EditMessageCaption>; type EditMessageCaptionInline = AutoRequest<B::EditMessageCaptionInline>; type EditMessageMedia = AutoRequest<B::EditMessageMedia>; type EditMessageMediaInline = AutoRequest<B::EditMessageMediaInline>; type EditMessageReplyMarkup = AutoRequest<B::EditMessageReplyMarkup>; type EditMessageReplyMarkupInline = AutoRequest<B::EditMessageReplyMarkupInline>; type StopPoll = AutoRequest<B::StopPoll>; type DeleteMessage = AutoRequest<B::DeleteMessage>; type SendSticker = AutoRequest<B::SendSticker>; type GetStickerSet = AutoRequest<B::GetStickerSet>; type GetCustomEmojiStickers = AutoRequest<B::GetCustomEmojiStickers>; type UploadStickerFile = AutoRequest<B::UploadStickerFile>; type CreateNewStickerSet = AutoRequest<B::CreateNewStickerSet>; type AddStickerToSet = AutoRequest<B::AddStickerToSet>; type SetStickerPositionInSet = AutoRequest<B::SetStickerPositionInSet>; type DeleteStickerFromSet = AutoRequest<B::DeleteStickerFromSet>; type SetStickerSetThumb = AutoRequest<B::SetStickerSetThumb>; type SendInvoice = AutoRequest<B::SendInvoice>; type CreateInvoiceLink = AutoRequest<B::CreateInvoiceLink>; type AnswerShippingQuery = AutoRequest<B::AnswerShippingQuery>; type AnswerPreCheckoutQuery = AutoRequest<B::AnswerPreCheckoutQuery>; type SetPassportDataErrors = AutoRequest<B::SetPassportDataErrors>; type SendGame = AutoRequest<B::SendGame>; type SetGameScore = AutoRequest<B::SetGameScore>; type SetGameScoreInline = AutoRequest<B::SetGameScoreInline>; type GetGameHighScores = AutoRequest<B::GetGameHighScores>; type ApproveChatJoinRequest = AutoRequest<B::ApproveChatJoinRequest>; type DeclineChatJoinRequest = AutoRequest<B::DeclineChatJoinRequest>;where
Self: Sized,
B: Requester, type Err = B::Err; type GetMe = AutoRequest<B::GetMe>; type LogOut = AutoRequest<B::LogOut>; type Close = AutoRequest<B::Close>; type GetUpdates = AutoRequest<B::GetUpdates>; type SetWebhook = AutoRequest<B::SetWebhook>; type DeleteWebhook = AutoRequest<B::DeleteWebhook>; type GetWebhookInfo = AutoRequest<B::GetWebhookInfo>; type ForwardMessage = AutoRequest<B::ForwardMessage>; type CopyMessage = AutoRequest<B::CopyMessage>; type SendMessage = AutoRequest<B::SendMessage>; type SendPhoto = AutoRequest<B::SendPhoto>; type SendAudio = AutoRequest<B::SendAudio>; type SendDocument = AutoRequest<B::SendDocument>; type SendVideo = AutoRequest<B::SendVideo>; type SendAnimation = AutoRequest<B::SendAnimation>; type SendVoice = AutoRequest<B::SendVoice>; type SendVideoNote = AutoRequest<B::SendVideoNote>; type SendMediaGroup = AutoRequest<B::SendMediaGroup>; type SendLocation = AutoRequest<B::SendLocation>; type EditMessageLiveLocation = AutoRequest<B::EditMessageLiveLocation>; type EditMessageLiveLocationInline = AutoRequest<B::EditMessageLiveLocationInline>; type StopMessageLiveLocation = AutoRequest<B::StopMessageLiveLocation>; type StopMessageLiveLocationInline = AutoRequest<B::StopMessageLiveLocationInline>; type SendVenue = AutoRequest<B::SendVenue>; type SendContact = AutoRequest<B::SendContact>; type SendPoll = AutoRequest<B::SendPoll>; type SendDice = AutoRequest<B::SendDice>; type SendChatAction = AutoRequest<B::SendChatAction>; type GetUserProfilePhotos = AutoRequest<B::GetUserProfilePhotos>; type GetFile = AutoRequest<B::GetFile>; type KickChatMember = AutoRequest<B::KickChatMember>; type BanChatMember = AutoRequest<B::BanChatMember>; type UnbanChatMember = AutoRequest<B::UnbanChatMember>; type RestrictChatMember = AutoRequest<B::RestrictChatMember>; type PromoteChatMember = AutoRequest<B::PromoteChatMember>; type SetChatAdministratorCustomTitle = AutoRequest<B::SetChatAdministratorCustomTitle>; type BanChatSenderChat = AutoRequest<B::BanChatSenderChat>; type UnbanChatSenderChat = AutoRequest<B::UnbanChatSenderChat>; type SetChatPermissions = AutoRequest<B::SetChatPermissions>; type ExportChatInviteLink = AutoRequest<B::ExportChatInviteLink>; type CreateChatInviteLink = AutoRequest<B::CreateChatInviteLink>; type EditChatInviteLink = AutoRequest<B::EditChatInviteLink>; type RevokeChatInviteLink = AutoRequest<B::RevokeChatInviteLink>; type SetChatPhoto = AutoRequest<B::SetChatPhoto>; type DeleteChatPhoto = AutoRequest<B::DeleteChatPhoto>; type SetChatTitle = AutoRequest<B::SetChatTitle>; type SetChatDescription = AutoRequest<B::SetChatDescription>; type PinChatMessage = AutoRequest<B::PinChatMessage>; type UnpinChatMessage = AutoRequest<B::UnpinChatMessage>; type UnpinAllChatMessages = AutoRequest<B::UnpinAllChatMessages>; type LeaveChat = AutoRequest<B::LeaveChat>; type GetChat = AutoRequest<B::GetChat>; type GetChatAdministrators = AutoRequest<B::GetChatAdministrators>; type GetChatMembersCount = AutoRequest<B::GetChatMembersCount>; type GetChatMemberCount = AutoRequest<B::GetChatMemberCount>; type GetChatMember = AutoRequest<B::GetChatMember>; type SetChatStickerSet = AutoRequest<B::SetChatStickerSet>; type DeleteChatStickerSet = AutoRequest<B::DeleteChatStickerSet>; type AnswerCallbackQuery = AutoRequest<B::AnswerCallbackQuery>; type SetMyCommands = AutoRequest<B::SetMyCommands>; type GetMyCommands = AutoRequest<B::GetMyCommands>; type SetChatMenuButton = AutoRequest<B::SetChatMenuButton>; type GetChatMenuButton = AutoRequest<B::GetChatMenuButton>; type SetMyDefaultAdministratorRights = AutoRequest<B::SetMyDefaultAdministratorRights>; type GetMyDefaultAdministratorRights = AutoRequest<B::GetMyDefaultAdministratorRights>; type DeleteMyCommands = AutoRequest<B::DeleteMyCommands>; type AnswerInlineQuery = AutoRequest<B::AnswerInlineQuery>; type AnswerWebAppQuery = AutoRequest<B::AnswerWebAppQuery>; type EditMessageText = AutoRequest<B::EditMessageText>; type EditMessageTextInline = AutoRequest<B::EditMessageTextInline>; type EditMessageCaption = AutoRequest<B::EditMessageCaption>; type EditMessageCaptionInline = AutoRequest<B::EditMessageCaptionInline>; type EditMessageMedia = AutoRequest<B::EditMessageMedia>; type EditMessageMediaInline = AutoRequest<B::EditMessageMediaInline>; type EditMessageReplyMarkup = AutoRequest<B::EditMessageReplyMarkup>; type EditMessageReplyMarkupInline = AutoRequest<B::EditMessageReplyMarkupInline>; type StopPoll = AutoRequest<B::StopPoll>; type DeleteMessage = AutoRequest<B::DeleteMessage>; type SendSticker = AutoRequest<B::SendSticker>; type GetStickerSet = AutoRequest<B::GetStickerSet>; type GetCustomEmojiStickers = AutoRequest<B::GetCustomEmojiStickers>; type UploadStickerFile = AutoRequest<B::UploadStickerFile>; type CreateNewStickerSet = AutoRequest<B::CreateNewStickerSet>; type AddStickerToSet = AutoRequest<B::AddStickerToSet>; type SetStickerPositionInSet = AutoRequest<B::SetStickerPositionInSet>; type DeleteStickerFromSet = AutoRequest<B::DeleteStickerFromSet>; type SetStickerSetThumb = AutoRequest<B::SetStickerSetThumb>; type SendInvoice = AutoRequest<B::SendInvoice>; type CreateInvoiceLink = AutoRequest<B::CreateInvoiceLink>; type AnswerShippingQuery = AutoRequest<B::AnswerShippingQuery>; type AnswerPreCheckoutQuery = AutoRequest<B::AnswerPreCheckoutQuery>; type SetPassportDataErrors = AutoRequest<B::SetPassportDataErrors>; type SendGame = AutoRequest<B::SendGame>; type SetGameScore = AutoRequest<B::SetGameScore>; type SetGameScoreInline = AutoRequest<B::SetGameScoreInline>; type GetGameHighScores = AutoRequest<B::GetGameHighScores>; type ApproveChatJoinRequest = AutoRequest<B::ApproveChatJoinRequest>; type DeclineChatJoinRequest = AutoRequest<B::DeclineChatJoinRequest>;
👎Deprecated since 0.8.0:
AutoSend is no longer required to .await requests and is now noopAvailable on crate feature
auto_send only.Send requests automatically, see AutoSend for more.
sourcefn erase<'a>(self) -> ErasedRequester<'a, Self::Err>ⓘNotable traits for ErasedRequester<'a, Err>impl<'a, Err> Requester for ErasedRequester<'a, Err>where
Err: Error + Send, type Err = Err; type GetMe = ErasedRequest<'a, GetMe, Err>; type LogOut = ErasedRequest<'a, LogOut, Err>; type Close = ErasedRequest<'a, Close, Err>; type GetUpdates = ErasedRequest<'a, GetUpdates, Err>; type SetWebhook = ErasedRequest<'a, SetWebhook, Err>; type DeleteWebhook = ErasedRequest<'a, DeleteWebhook, Err>; type GetWebhookInfo = ErasedRequest<'a, GetWebhookInfo, Err>; type ForwardMessage = ErasedRequest<'a, ForwardMessage, Err>; type CopyMessage = ErasedRequest<'a, CopyMessage, Err>; type SendMessage = ErasedRequest<'a, SendMessage, Err>; type SendPhoto = ErasedRequest<'a, SendPhoto, Err>; type SendAudio = ErasedRequest<'a, SendAudio, Err>; type SendDocument = ErasedRequest<'a, SendDocument, Err>; type SendVideo = ErasedRequest<'a, SendVideo, Err>; type SendAnimation = ErasedRequest<'a, SendAnimation, Err>; type SendVoice = ErasedRequest<'a, SendVoice, Err>; type SendVideoNote = ErasedRequest<'a, SendVideoNote, Err>; type SendMediaGroup = ErasedRequest<'a, SendMediaGroup, Err>; type SendLocation = ErasedRequest<'a, SendLocation, Err>; type EditMessageLiveLocation = ErasedRequest<'a, EditMessageLiveLocation, Err>; type EditMessageLiveLocationInline = ErasedRequest<'a, EditMessageLiveLocationInline, Err>; type StopMessageLiveLocation = ErasedRequest<'a, StopMessageLiveLocation, Err>; type StopMessageLiveLocationInline = ErasedRequest<'a, StopMessageLiveLocationInline, Err>; type SendVenue = ErasedRequest<'a, SendVenue, Err>; type SendContact = ErasedRequest<'a, SendContact, Err>; type SendPoll = ErasedRequest<'a, SendPoll, Err>; type SendDice = ErasedRequest<'a, SendDice, Err>; type SendChatAction = ErasedRequest<'a, SendChatAction, Err>; type GetUserProfilePhotos = ErasedRequest<'a, GetUserProfilePhotos, Err>; type GetFile = ErasedRequest<'a, GetFile, Err>; type KickChatMember = ErasedRequest<'a, KickChatMember, Err>; type BanChatMember = ErasedRequest<'a, BanChatMember, Err>; type UnbanChatMember = ErasedRequest<'a, UnbanChatMember, Err>; type RestrictChatMember = ErasedRequest<'a, RestrictChatMember, Err>; type PromoteChatMember = ErasedRequest<'a, PromoteChatMember, Err>; type SetChatAdministratorCustomTitle = ErasedRequest<'a, SetChatAdministratorCustomTitle, Err>; type BanChatSenderChat = ErasedRequest<'a, BanChatSenderChat, Err>; type UnbanChatSenderChat = ErasedRequest<'a, UnbanChatSenderChat, Err>; type SetChatPermissions = ErasedRequest<'a, SetChatPermissions, Err>; type ExportChatInviteLink = ErasedRequest<'a, ExportChatInviteLink, Err>; type CreateChatInviteLink = ErasedRequest<'a, CreateChatInviteLink, Err>; type EditChatInviteLink = ErasedRequest<'a, EditChatInviteLink, Err>; type RevokeChatInviteLink = ErasedRequest<'a, RevokeChatInviteLink, Err>; type SetChatPhoto = ErasedRequest<'a, SetChatPhoto, Err>; type DeleteChatPhoto = ErasedRequest<'a, DeleteChatPhoto, Err>; type SetChatTitle = ErasedRequest<'a, SetChatTitle, Err>; type SetChatDescription = ErasedRequest<'a, SetChatDescription, Err>; type PinChatMessage = ErasedRequest<'a, PinChatMessage, Err>; type UnpinChatMessage = ErasedRequest<'a, UnpinChatMessage, Err>; type UnpinAllChatMessages = ErasedRequest<'a, UnpinAllChatMessages, Err>; type LeaveChat = ErasedRequest<'a, LeaveChat, Err>; type GetChat = ErasedRequest<'a, GetChat, Err>; type GetChatAdministrators = ErasedRequest<'a, GetChatAdministrators, Err>; type GetChatMembersCount = ErasedRequest<'a, GetChatMembersCount, Err>; type GetChatMemberCount = ErasedRequest<'a, GetChatMemberCount, Err>; type GetChatMember = ErasedRequest<'a, GetChatMember, Err>; type SetChatStickerSet = ErasedRequest<'a, SetChatStickerSet, Err>; type DeleteChatStickerSet = ErasedRequest<'a, DeleteChatStickerSet, Err>; type AnswerCallbackQuery = ErasedRequest<'a, AnswerCallbackQuery, Err>; type SetMyCommands = ErasedRequest<'a, SetMyCommands, Err>; type GetMyCommands = ErasedRequest<'a, GetMyCommands, Err>; type SetChatMenuButton = ErasedRequest<'a, SetChatMenuButton, Err>; type GetChatMenuButton = ErasedRequest<'a, GetChatMenuButton, Err>; type SetMyDefaultAdministratorRights = ErasedRequest<'a, SetMyDefaultAdministratorRights, Err>; type GetMyDefaultAdministratorRights = ErasedRequest<'a, GetMyDefaultAdministratorRights, Err>; type DeleteMyCommands = ErasedRequest<'a, DeleteMyCommands, Err>; type AnswerInlineQuery = ErasedRequest<'a, AnswerInlineQuery, Err>; type AnswerWebAppQuery = ErasedRequest<'a, AnswerWebAppQuery, Err>; type EditMessageText = ErasedRequest<'a, EditMessageText, Err>; type EditMessageTextInline = ErasedRequest<'a, EditMessageTextInline, Err>; type EditMessageCaption = ErasedRequest<'a, EditMessageCaption, Err>; type EditMessageCaptionInline = ErasedRequest<'a, EditMessageCaptionInline, Err>; type EditMessageMedia = ErasedRequest<'a, EditMessageMedia, Err>; type EditMessageMediaInline = ErasedRequest<'a, EditMessageMediaInline, Err>; type EditMessageReplyMarkup = ErasedRequest<'a, EditMessageReplyMarkup, Err>; type EditMessageReplyMarkupInline = ErasedRequest<'a, EditMessageReplyMarkupInline, Err>; type StopPoll = ErasedRequest<'a, StopPoll, Err>; type DeleteMessage = ErasedRequest<'a, DeleteMessage, Err>; type SendSticker = ErasedRequest<'a, SendSticker, Err>; type GetStickerSet = ErasedRequest<'a, GetStickerSet, Err>; type GetCustomEmojiStickers = ErasedRequest<'a, GetCustomEmojiStickers, Err>; type UploadStickerFile = ErasedRequest<'a, UploadStickerFile, Err>; type CreateNewStickerSet = ErasedRequest<'a, CreateNewStickerSet, Err>; type AddStickerToSet = ErasedRequest<'a, AddStickerToSet, Err>; type SetStickerPositionInSet = ErasedRequest<'a, SetStickerPositionInSet, Err>; type DeleteStickerFromSet = ErasedRequest<'a, DeleteStickerFromSet, Err>; type SetStickerSetThumb = ErasedRequest<'a, SetStickerSetThumb, Err>; type SendInvoice = ErasedRequest<'a, SendInvoice, Err>; type CreateInvoiceLink = ErasedRequest<'a, CreateInvoiceLink, Err>; type AnswerShippingQuery = ErasedRequest<'a, AnswerShippingQuery, Err>; type AnswerPreCheckoutQuery = ErasedRequest<'a, AnswerPreCheckoutQuery, Err>; type SetPassportDataErrors = ErasedRequest<'a, SetPassportDataErrors, Err>; type SendGame = ErasedRequest<'a, SendGame, Err>; type SetGameScore = ErasedRequest<'a, SetGameScore, Err>; type SetGameScoreInline = ErasedRequest<'a, SetGameScoreInline, Err>; type GetGameHighScores = ErasedRequest<'a, GetGameHighScores, Err>; type ApproveChatJoinRequest = ErasedRequest<'a, ApproveChatJoinRequest, Err>; type DeclineChatJoinRequest = ErasedRequest<'a, DeclineChatJoinRequest, Err>;where
Self: 'a,
Self: Sized,
fn erase<'a>(self) -> ErasedRequester<'a, Self::Err>ⓘNotable traits for ErasedRequester<'a, Err>impl<'a, Err> Requester for ErasedRequester<'a, Err>where
Err: Error + Send, type Err = Err; type GetMe = ErasedRequest<'a, GetMe, Err>; type LogOut = ErasedRequest<'a, LogOut, Err>; type Close = ErasedRequest<'a, Close, Err>; type GetUpdates = ErasedRequest<'a, GetUpdates, Err>; type SetWebhook = ErasedRequest<'a, SetWebhook, Err>; type DeleteWebhook = ErasedRequest<'a, DeleteWebhook, Err>; type GetWebhookInfo = ErasedRequest<'a, GetWebhookInfo, Err>; type ForwardMessage = ErasedRequest<'a, ForwardMessage, Err>; type CopyMessage = ErasedRequest<'a, CopyMessage, Err>; type SendMessage = ErasedRequest<'a, SendMessage, Err>; type SendPhoto = ErasedRequest<'a, SendPhoto, Err>; type SendAudio = ErasedRequest<'a, SendAudio, Err>; type SendDocument = ErasedRequest<'a, SendDocument, Err>; type SendVideo = ErasedRequest<'a, SendVideo, Err>; type SendAnimation = ErasedRequest<'a, SendAnimation, Err>; type SendVoice = ErasedRequest<'a, SendVoice, Err>; type SendVideoNote = ErasedRequest<'a, SendVideoNote, Err>; type SendMediaGroup = ErasedRequest<'a, SendMediaGroup, Err>; type SendLocation = ErasedRequest<'a, SendLocation, Err>; type EditMessageLiveLocation = ErasedRequest<'a, EditMessageLiveLocation, Err>; type EditMessageLiveLocationInline = ErasedRequest<'a, EditMessageLiveLocationInline, Err>; type StopMessageLiveLocation = ErasedRequest<'a, StopMessageLiveLocation, Err>; type StopMessageLiveLocationInline = ErasedRequest<'a, StopMessageLiveLocationInline, Err>; type SendVenue = ErasedRequest<'a, SendVenue, Err>; type SendContact = ErasedRequest<'a, SendContact, Err>; type SendPoll = ErasedRequest<'a, SendPoll, Err>; type SendDice = ErasedRequest<'a, SendDice, Err>; type SendChatAction = ErasedRequest<'a, SendChatAction, Err>; type GetUserProfilePhotos = ErasedRequest<'a, GetUserProfilePhotos, Err>; type GetFile = ErasedRequest<'a, GetFile, Err>; type KickChatMember = ErasedRequest<'a, KickChatMember, Err>; type BanChatMember = ErasedRequest<'a, BanChatMember, Err>; type UnbanChatMember = ErasedRequest<'a, UnbanChatMember, Err>; type RestrictChatMember = ErasedRequest<'a, RestrictChatMember, Err>; type PromoteChatMember = ErasedRequest<'a, PromoteChatMember, Err>; type SetChatAdministratorCustomTitle = ErasedRequest<'a, SetChatAdministratorCustomTitle, Err>; type BanChatSenderChat = ErasedRequest<'a, BanChatSenderChat, Err>; type UnbanChatSenderChat = ErasedRequest<'a, UnbanChatSenderChat, Err>; type SetChatPermissions = ErasedRequest<'a, SetChatPermissions, Err>; type ExportChatInviteLink = ErasedRequest<'a, ExportChatInviteLink, Err>; type CreateChatInviteLink = ErasedRequest<'a, CreateChatInviteLink, Err>; type EditChatInviteLink = ErasedRequest<'a, EditChatInviteLink, Err>; type RevokeChatInviteLink = ErasedRequest<'a, RevokeChatInviteLink, Err>; type SetChatPhoto = ErasedRequest<'a, SetChatPhoto, Err>; type DeleteChatPhoto = ErasedRequest<'a, DeleteChatPhoto, Err>; type SetChatTitle = ErasedRequest<'a, SetChatTitle, Err>; type SetChatDescription = ErasedRequest<'a, SetChatDescription, Err>; type PinChatMessage = ErasedRequest<'a, PinChatMessage, Err>; type UnpinChatMessage = ErasedRequest<'a, UnpinChatMessage, Err>; type UnpinAllChatMessages = ErasedRequest<'a, UnpinAllChatMessages, Err>; type LeaveChat = ErasedRequest<'a, LeaveChat, Err>; type GetChat = ErasedRequest<'a, GetChat, Err>; type GetChatAdministrators = ErasedRequest<'a, GetChatAdministrators, Err>; type GetChatMembersCount = ErasedRequest<'a, GetChatMembersCount, Err>; type GetChatMemberCount = ErasedRequest<'a, GetChatMemberCount, Err>; type GetChatMember = ErasedRequest<'a, GetChatMember, Err>; type SetChatStickerSet = ErasedRequest<'a, SetChatStickerSet, Err>; type DeleteChatStickerSet = ErasedRequest<'a, DeleteChatStickerSet, Err>; type AnswerCallbackQuery = ErasedRequest<'a, AnswerCallbackQuery, Err>; type SetMyCommands = ErasedRequest<'a, SetMyCommands, Err>; type GetMyCommands = ErasedRequest<'a, GetMyCommands, Err>; type SetChatMenuButton = ErasedRequest<'a, SetChatMenuButton, Err>; type GetChatMenuButton = ErasedRequest<'a, GetChatMenuButton, Err>; type SetMyDefaultAdministratorRights = ErasedRequest<'a, SetMyDefaultAdministratorRights, Err>; type GetMyDefaultAdministratorRights = ErasedRequest<'a, GetMyDefaultAdministratorRights, Err>; type DeleteMyCommands = ErasedRequest<'a, DeleteMyCommands, Err>; type AnswerInlineQuery = ErasedRequest<'a, AnswerInlineQuery, Err>; type AnswerWebAppQuery = ErasedRequest<'a, AnswerWebAppQuery, Err>; type EditMessageText = ErasedRequest<'a, EditMessageText, Err>; type EditMessageTextInline = ErasedRequest<'a, EditMessageTextInline, Err>; type EditMessageCaption = ErasedRequest<'a, EditMessageCaption, Err>; type EditMessageCaptionInline = ErasedRequest<'a, EditMessageCaptionInline, Err>; type EditMessageMedia = ErasedRequest<'a, EditMessageMedia, Err>; type EditMessageMediaInline = ErasedRequest<'a, EditMessageMediaInline, Err>; type EditMessageReplyMarkup = ErasedRequest<'a, EditMessageReplyMarkup, Err>; type EditMessageReplyMarkupInline = ErasedRequest<'a, EditMessageReplyMarkupInline, Err>; type StopPoll = ErasedRequest<'a, StopPoll, Err>; type DeleteMessage = ErasedRequest<'a, DeleteMessage, Err>; type SendSticker = ErasedRequest<'a, SendSticker, Err>; type GetStickerSet = ErasedRequest<'a, GetStickerSet, Err>; type GetCustomEmojiStickers = ErasedRequest<'a, GetCustomEmojiStickers, Err>; type UploadStickerFile = ErasedRequest<'a, UploadStickerFile, Err>; type CreateNewStickerSet = ErasedRequest<'a, CreateNewStickerSet, Err>; type AddStickerToSet = ErasedRequest<'a, AddStickerToSet, Err>; type SetStickerPositionInSet = ErasedRequest<'a, SetStickerPositionInSet, Err>; type DeleteStickerFromSet = ErasedRequest<'a, DeleteStickerFromSet, Err>; type SetStickerSetThumb = ErasedRequest<'a, SetStickerSetThumb, Err>; type SendInvoice = ErasedRequest<'a, SendInvoice, Err>; type CreateInvoiceLink = ErasedRequest<'a, CreateInvoiceLink, Err>; type AnswerShippingQuery = ErasedRequest<'a, AnswerShippingQuery, Err>; type AnswerPreCheckoutQuery = ErasedRequest<'a, AnswerPreCheckoutQuery, Err>; type SetPassportDataErrors = ErasedRequest<'a, SetPassportDataErrors, Err>; type SendGame = ErasedRequest<'a, SendGame, Err>; type SetGameScore = ErasedRequest<'a, SetGameScore, Err>; type SetGameScoreInline = ErasedRequest<'a, SetGameScoreInline, Err>; type GetGameHighScores = ErasedRequest<'a, GetGameHighScores, Err>; type ApproveChatJoinRequest = ErasedRequest<'a, ApproveChatJoinRequest, Err>; type DeclineChatJoinRequest = ErasedRequest<'a, DeclineChatJoinRequest, Err>;where
Self: 'a,
Self: Sized,
Err: Error + Send, type Err = Err; type GetMe = ErasedRequest<'a, GetMe, Err>; type LogOut = ErasedRequest<'a, LogOut, Err>; type Close = ErasedRequest<'a, Close, Err>; type GetUpdates = ErasedRequest<'a, GetUpdates, Err>; type SetWebhook = ErasedRequest<'a, SetWebhook, Err>; type DeleteWebhook = ErasedRequest<'a, DeleteWebhook, Err>; type GetWebhookInfo = ErasedRequest<'a, GetWebhookInfo, Err>; type ForwardMessage = ErasedRequest<'a, ForwardMessage, Err>; type CopyMessage = ErasedRequest<'a, CopyMessage, Err>; type SendMessage = ErasedRequest<'a, SendMessage, Err>; type SendPhoto = ErasedRequest<'a, SendPhoto, Err>; type SendAudio = ErasedRequest<'a, SendAudio, Err>; type SendDocument = ErasedRequest<'a, SendDocument, Err>; type SendVideo = ErasedRequest<'a, SendVideo, Err>; type SendAnimation = ErasedRequest<'a, SendAnimation, Err>; type SendVoice = ErasedRequest<'a, SendVoice, Err>; type SendVideoNote = ErasedRequest<'a, SendVideoNote, Err>; type SendMediaGroup = ErasedRequest<'a, SendMediaGroup, Err>; type SendLocation = ErasedRequest<'a, SendLocation, Err>; type EditMessageLiveLocation = ErasedRequest<'a, EditMessageLiveLocation, Err>; type EditMessageLiveLocationInline = ErasedRequest<'a, EditMessageLiveLocationInline, Err>; type StopMessageLiveLocation = ErasedRequest<'a, StopMessageLiveLocation, Err>; type StopMessageLiveLocationInline = ErasedRequest<'a, StopMessageLiveLocationInline, Err>; type SendVenue = ErasedRequest<'a, SendVenue, Err>; type SendContact = ErasedRequest<'a, SendContact, Err>; type SendPoll = ErasedRequest<'a, SendPoll, Err>; type SendDice = ErasedRequest<'a, SendDice, Err>; type SendChatAction = ErasedRequest<'a, SendChatAction, Err>; type GetUserProfilePhotos = ErasedRequest<'a, GetUserProfilePhotos, Err>; type GetFile = ErasedRequest<'a, GetFile, Err>; type KickChatMember = ErasedRequest<'a, KickChatMember, Err>; type BanChatMember = ErasedRequest<'a, BanChatMember, Err>; type UnbanChatMember = ErasedRequest<'a, UnbanChatMember, Err>; type RestrictChatMember = ErasedRequest<'a, RestrictChatMember, Err>; type PromoteChatMember = ErasedRequest<'a, PromoteChatMember, Err>; type SetChatAdministratorCustomTitle = ErasedRequest<'a, SetChatAdministratorCustomTitle, Err>; type BanChatSenderChat = ErasedRequest<'a, BanChatSenderChat, Err>; type UnbanChatSenderChat = ErasedRequest<'a, UnbanChatSenderChat, Err>; type SetChatPermissions = ErasedRequest<'a, SetChatPermissions, Err>; type ExportChatInviteLink = ErasedRequest<'a, ExportChatInviteLink, Err>; type CreateChatInviteLink = ErasedRequest<'a, CreateChatInviteLink, Err>; type EditChatInviteLink = ErasedRequest<'a, EditChatInviteLink, Err>; type RevokeChatInviteLink = ErasedRequest<'a, RevokeChatInviteLink, Err>; type SetChatPhoto = ErasedRequest<'a, SetChatPhoto, Err>; type DeleteChatPhoto = ErasedRequest<'a, DeleteChatPhoto, Err>; type SetChatTitle = ErasedRequest<'a, SetChatTitle, Err>; type SetChatDescription = ErasedRequest<'a, SetChatDescription, Err>; type PinChatMessage = ErasedRequest<'a, PinChatMessage, Err>; type UnpinChatMessage = ErasedRequest<'a, UnpinChatMessage, Err>; type UnpinAllChatMessages = ErasedRequest<'a, UnpinAllChatMessages, Err>; type LeaveChat = ErasedRequest<'a, LeaveChat, Err>; type GetChat = ErasedRequest<'a, GetChat, Err>; type GetChatAdministrators = ErasedRequest<'a, GetChatAdministrators, Err>; type GetChatMembersCount = ErasedRequest<'a, GetChatMembersCount, Err>; type GetChatMemberCount = ErasedRequest<'a, GetChatMemberCount, Err>; type GetChatMember = ErasedRequest<'a, GetChatMember, Err>; type SetChatStickerSet = ErasedRequest<'a, SetChatStickerSet, Err>; type DeleteChatStickerSet = ErasedRequest<'a, DeleteChatStickerSet, Err>; type AnswerCallbackQuery = ErasedRequest<'a, AnswerCallbackQuery, Err>; type SetMyCommands = ErasedRequest<'a, SetMyCommands, Err>; type GetMyCommands = ErasedRequest<'a, GetMyCommands, Err>; type SetChatMenuButton = ErasedRequest<'a, SetChatMenuButton, Err>; type GetChatMenuButton = ErasedRequest<'a, GetChatMenuButton, Err>; type SetMyDefaultAdministratorRights = ErasedRequest<'a, SetMyDefaultAdministratorRights, Err>; type GetMyDefaultAdministratorRights = ErasedRequest<'a, GetMyDefaultAdministratorRights, Err>; type DeleteMyCommands = ErasedRequest<'a, DeleteMyCommands, Err>; type AnswerInlineQuery = ErasedRequest<'a, AnswerInlineQuery, Err>; type AnswerWebAppQuery = ErasedRequest<'a, AnswerWebAppQuery, Err>; type EditMessageText = ErasedRequest<'a, EditMessageText, Err>; type EditMessageTextInline = ErasedRequest<'a, EditMessageTextInline, Err>; type EditMessageCaption = ErasedRequest<'a, EditMessageCaption, Err>; type EditMessageCaptionInline = ErasedRequest<'a, EditMessageCaptionInline, Err>; type EditMessageMedia = ErasedRequest<'a, EditMessageMedia, Err>; type EditMessageMediaInline = ErasedRequest<'a, EditMessageMediaInline, Err>; type EditMessageReplyMarkup = ErasedRequest<'a, EditMessageReplyMarkup, Err>; type EditMessageReplyMarkupInline = ErasedRequest<'a, EditMessageReplyMarkupInline, Err>; type StopPoll = ErasedRequest<'a, StopPoll, Err>; type DeleteMessage = ErasedRequest<'a, DeleteMessage, Err>; type SendSticker = ErasedRequest<'a, SendSticker, Err>; type GetStickerSet = ErasedRequest<'a, GetStickerSet, Err>; type GetCustomEmojiStickers = ErasedRequest<'a, GetCustomEmojiStickers, Err>; type UploadStickerFile = ErasedRequest<'a, UploadStickerFile, Err>; type CreateNewStickerSet = ErasedRequest<'a, CreateNewStickerSet, Err>; type AddStickerToSet = ErasedRequest<'a, AddStickerToSet, Err>; type SetStickerPositionInSet = ErasedRequest<'a, SetStickerPositionInSet, Err>; type DeleteStickerFromSet = ErasedRequest<'a, DeleteStickerFromSet, Err>; type SetStickerSetThumb = ErasedRequest<'a, SetStickerSetThumb, Err>; type SendInvoice = ErasedRequest<'a, SendInvoice, Err>; type CreateInvoiceLink = ErasedRequest<'a, CreateInvoiceLink, Err>; type AnswerShippingQuery = ErasedRequest<'a, AnswerShippingQuery, Err>; type AnswerPreCheckoutQuery = ErasedRequest<'a, AnswerPreCheckoutQuery, Err>; type SetPassportDataErrors = ErasedRequest<'a, SetPassportDataErrors, Err>; type SendGame = ErasedRequest<'a, SendGame, Err>; type SetGameScore = ErasedRequest<'a, SetGameScore, Err>; type SetGameScoreInline = ErasedRequest<'a, SetGameScoreInline, Err>; type GetGameHighScores = ErasedRequest<'a, GetGameHighScores, Err>; type ApproveChatJoinRequest = ErasedRequest<'a, ApproveChatJoinRequest, Err>; type DeclineChatJoinRequest = ErasedRequest<'a, DeclineChatJoinRequest, Err>;
Available on crate feature
erased only.Erase requester type.
Examples found in repository?
examples/erased.rs (line 35)
≺ ≻
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
async fn main() -> Result<(), Box<dyn std::error::Error>> {
pretty_env_logger::init();
let chat_id = ChatId(
std::env::var("CHAT_ID")
.expect("Expected CHAT_ID env var")
.parse::<i64>()?,
);
let trace_settings = match std::env::var("TRACE").as_deref() {
Ok("EVERYTHING_VERBOSE") => trace::Settings::TRACE_EVERYTHING_VERBOSE,
Ok("EVERYTHING") => trace::Settings::TRACE_EVERYTHING,
Ok("REQUESTS_VERBOSE") => trace::Settings::TRACE_REQUESTS_VERBOSE,
Ok("REQUESTS") => trace::Settings::TRACE_REQUESTS,
Ok("RESPONSES_VERBOSE") => trace::Settings::TRACE_RESPONSES_VERBOSE,
Ok("RESPONSES") => trace::Settings::TRACE_RESPONSES,
Ok("EMPTY") | Ok("") | Err(VarError::NotPresent) => trace::Settings::empty(),
Ok(_) | Err(VarError::NotUnicode(_)) => {
panic!(
"Expected `TRACE` environment variable to be equal to any of the following: \
`EVERYTHING_VERBOSE`, `EVERYTHING`, `REQUESTS_VERBOSE`, `REQUESTS`, \
`RESPONSES_VERBOSE`, `RESPONSES`, `EMPTY`, `` (empty string)"
)
}
};
log::info!("Trace settings: {:?}", trace_settings);
let bot = if trace_settings.is_empty() {
Bot::from_env().erase()
} else {
Bot::from_env().trace(trace_settings).erase()
};
bot.send_chat_action(chat_id, ChatAction::Typing).await?;
tokio::time::sleep(Duration::from_secs(1)).await;
bot.send_message(chat_id, "Hey hey hey").await?;
Ok(())
}sourcefn trace(self, settings: Settings) -> Trace<Self>ⓘNotable traits for Trace<B>impl<B> Requester for Trace<B>where
B: Requester, type Err = B::Err; type GetMe = TraceRequest<B::GetMe>; type LogOut = TraceRequest<B::LogOut>; type Close = TraceRequest<B::Close>; type GetUpdates = TraceRequest<B::GetUpdates>; type SetWebhook = TraceRequest<B::SetWebhook>; type DeleteWebhook = TraceRequest<B::DeleteWebhook>; type GetWebhookInfo = TraceRequest<B::GetWebhookInfo>; type ForwardMessage = TraceRequest<B::ForwardMessage>; type CopyMessage = TraceRequest<B::CopyMessage>; type SendMessage = TraceRequest<B::SendMessage>; type SendPhoto = TraceRequest<B::SendPhoto>; type SendAudio = TraceRequest<B::SendAudio>; type SendDocument = TraceRequest<B::SendDocument>; type SendVideo = TraceRequest<B::SendVideo>; type SendAnimation = TraceRequest<B::SendAnimation>; type SendVoice = TraceRequest<B::SendVoice>; type SendVideoNote = TraceRequest<B::SendVideoNote>; type SendMediaGroup = TraceRequest<B::SendMediaGroup>; type SendLocation = TraceRequest<B::SendLocation>; type EditMessageLiveLocation = TraceRequest<B::EditMessageLiveLocation>; type EditMessageLiveLocationInline = TraceRequest<B::EditMessageLiveLocationInline>; type StopMessageLiveLocation = TraceRequest<B::StopMessageLiveLocation>; type StopMessageLiveLocationInline = TraceRequest<B::StopMessageLiveLocationInline>; type SendVenue = TraceRequest<B::SendVenue>; type SendContact = TraceRequest<B::SendContact>; type SendPoll = TraceRequest<B::SendPoll>; type SendDice = TraceRequest<B::SendDice>; type SendChatAction = TraceRequest<B::SendChatAction>; type GetUserProfilePhotos = TraceRequest<B::GetUserProfilePhotos>; type GetFile = TraceRequest<B::GetFile>; type KickChatMember = TraceRequest<B::KickChatMember>; type BanChatMember = TraceRequest<B::BanChatMember>; type UnbanChatMember = TraceRequest<B::UnbanChatMember>; type RestrictChatMember = TraceRequest<B::RestrictChatMember>; type PromoteChatMember = TraceRequest<B::PromoteChatMember>; type SetChatAdministratorCustomTitle = TraceRequest<B::SetChatAdministratorCustomTitle>; type BanChatSenderChat = TraceRequest<B::BanChatSenderChat>; type UnbanChatSenderChat = TraceRequest<B::UnbanChatSenderChat>; type SetChatPermissions = TraceRequest<B::SetChatPermissions>; type ExportChatInviteLink = TraceRequest<B::ExportChatInviteLink>; type CreateChatInviteLink = TraceRequest<B::CreateChatInviteLink>; type EditChatInviteLink = TraceRequest<B::EditChatInviteLink>; type RevokeChatInviteLink = TraceRequest<B::RevokeChatInviteLink>; type SetChatPhoto = TraceRequest<B::SetChatPhoto>; type DeleteChatPhoto = TraceRequest<B::DeleteChatPhoto>; type SetChatTitle = TraceRequest<B::SetChatTitle>; type SetChatDescription = TraceRequest<B::SetChatDescription>; type PinChatMessage = TraceRequest<B::PinChatMessage>; type UnpinChatMessage = TraceRequest<B::UnpinChatMessage>; type UnpinAllChatMessages = TraceRequest<B::UnpinAllChatMessages>; type LeaveChat = TraceRequest<B::LeaveChat>; type GetChat = TraceRequest<B::GetChat>; type GetChatAdministrators = TraceRequest<B::GetChatAdministrators>; type GetChatMembersCount = TraceRequest<B::GetChatMembersCount>; type GetChatMemberCount = TraceRequest<B::GetChatMemberCount>; type GetChatMember = TraceRequest<B::GetChatMember>; type SetChatStickerSet = TraceRequest<B::SetChatStickerSet>; type DeleteChatStickerSet = TraceRequest<B::DeleteChatStickerSet>; type AnswerCallbackQuery = TraceRequest<B::AnswerCallbackQuery>; type SetMyCommands = TraceRequest<B::SetMyCommands>; type GetMyCommands = TraceRequest<B::GetMyCommands>; type SetChatMenuButton = TraceRequest<B::SetChatMenuButton>; type GetChatMenuButton = TraceRequest<B::GetChatMenuButton>; type SetMyDefaultAdministratorRights = TraceRequest<B::SetMyDefaultAdministratorRights>; type GetMyDefaultAdministratorRights = TraceRequest<B::GetMyDefaultAdministratorRights>; type DeleteMyCommands = TraceRequest<B::DeleteMyCommands>; type AnswerInlineQuery = TraceRequest<B::AnswerInlineQuery>; type AnswerWebAppQuery = TraceRequest<B::AnswerWebAppQuery>; type EditMessageText = TraceRequest<B::EditMessageText>; type EditMessageTextInline = TraceRequest<B::EditMessageTextInline>; type EditMessageCaption = TraceRequest<B::EditMessageCaption>; type EditMessageCaptionInline = TraceRequest<B::EditMessageCaptionInline>; type EditMessageMedia = TraceRequest<B::EditMessageMedia>; type EditMessageMediaInline = TraceRequest<B::EditMessageMediaInline>; type EditMessageReplyMarkup = TraceRequest<B::EditMessageReplyMarkup>; type EditMessageReplyMarkupInline = TraceRequest<B::EditMessageReplyMarkupInline>; type StopPoll = TraceRequest<B::StopPoll>; type DeleteMessage = TraceRequest<B::DeleteMessage>; type SendSticker = TraceRequest<B::SendSticker>; type GetStickerSet = TraceRequest<B::GetStickerSet>; type GetCustomEmojiStickers = TraceRequest<B::GetCustomEmojiStickers>; type UploadStickerFile = TraceRequest<B::UploadStickerFile>; type CreateNewStickerSet = TraceRequest<B::CreateNewStickerSet>; type AddStickerToSet = TraceRequest<B::AddStickerToSet>; type SetStickerPositionInSet = TraceRequest<B::SetStickerPositionInSet>; type DeleteStickerFromSet = TraceRequest<B::DeleteStickerFromSet>; type SetStickerSetThumb = TraceRequest<B::SetStickerSetThumb>; type SendInvoice = TraceRequest<B::SendInvoice>; type CreateInvoiceLink = TraceRequest<B::CreateInvoiceLink>; type AnswerShippingQuery = TraceRequest<B::AnswerShippingQuery>; type AnswerPreCheckoutQuery = TraceRequest<B::AnswerPreCheckoutQuery>; type SetPassportDataErrors = TraceRequest<B::SetPassportDataErrors>; type SendGame = TraceRequest<B::SendGame>; type SetGameScore = TraceRequest<B::SetGameScore>; type SetGameScoreInline = TraceRequest<B::SetGameScoreInline>; type GetGameHighScores = TraceRequest<B::GetGameHighScores>; type ApproveChatJoinRequest = TraceRequest<B::ApproveChatJoinRequest>; type DeclineChatJoinRequest = TraceRequest<B::DeclineChatJoinRequest>;where
Self: Sized,
fn trace(self, settings: Settings) -> Trace<Self>ⓘNotable traits for Trace<B>impl<B> Requester for Trace<B>where
B: Requester, type Err = B::Err; type GetMe = TraceRequest<B::GetMe>; type LogOut = TraceRequest<B::LogOut>; type Close = TraceRequest<B::Close>; type GetUpdates = TraceRequest<B::GetUpdates>; type SetWebhook = TraceRequest<B::SetWebhook>; type DeleteWebhook = TraceRequest<B::DeleteWebhook>; type GetWebhookInfo = TraceRequest<B::GetWebhookInfo>; type ForwardMessage = TraceRequest<B::ForwardMessage>; type CopyMessage = TraceRequest<B::CopyMessage>; type SendMessage = TraceRequest<B::SendMessage>; type SendPhoto = TraceRequest<B::SendPhoto>; type SendAudio = TraceRequest<B::SendAudio>; type SendDocument = TraceRequest<B::SendDocument>; type SendVideo = TraceRequest<B::SendVideo>; type SendAnimation = TraceRequest<B::SendAnimation>; type SendVoice = TraceRequest<B::SendVoice>; type SendVideoNote = TraceRequest<B::SendVideoNote>; type SendMediaGroup = TraceRequest<B::SendMediaGroup>; type SendLocation = TraceRequest<B::SendLocation>; type EditMessageLiveLocation = TraceRequest<B::EditMessageLiveLocation>; type EditMessageLiveLocationInline = TraceRequest<B::EditMessageLiveLocationInline>; type StopMessageLiveLocation = TraceRequest<B::StopMessageLiveLocation>; type StopMessageLiveLocationInline = TraceRequest<B::StopMessageLiveLocationInline>; type SendVenue = TraceRequest<B::SendVenue>; type SendContact = TraceRequest<B::SendContact>; type SendPoll = TraceRequest<B::SendPoll>; type SendDice = TraceRequest<B::SendDice>; type SendChatAction = TraceRequest<B::SendChatAction>; type GetUserProfilePhotos = TraceRequest<B::GetUserProfilePhotos>; type GetFile = TraceRequest<B::GetFile>; type KickChatMember = TraceRequest<B::KickChatMember>; type BanChatMember = TraceRequest<B::BanChatMember>; type UnbanChatMember = TraceRequest<B::UnbanChatMember>; type RestrictChatMember = TraceRequest<B::RestrictChatMember>; type PromoteChatMember = TraceRequest<B::PromoteChatMember>; type SetChatAdministratorCustomTitle = TraceRequest<B::SetChatAdministratorCustomTitle>; type BanChatSenderChat = TraceRequest<B::BanChatSenderChat>; type UnbanChatSenderChat = TraceRequest<B::UnbanChatSenderChat>; type SetChatPermissions = TraceRequest<B::SetChatPermissions>; type ExportChatInviteLink = TraceRequest<B::ExportChatInviteLink>; type CreateChatInviteLink = TraceRequest<B::CreateChatInviteLink>; type EditChatInviteLink = TraceRequest<B::EditChatInviteLink>; type RevokeChatInviteLink = TraceRequest<B::RevokeChatInviteLink>; type SetChatPhoto = TraceRequest<B::SetChatPhoto>; type DeleteChatPhoto = TraceRequest<B::DeleteChatPhoto>; type SetChatTitle = TraceRequest<B::SetChatTitle>; type SetChatDescription = TraceRequest<B::SetChatDescription>; type PinChatMessage = TraceRequest<B::PinChatMessage>; type UnpinChatMessage = TraceRequest<B::UnpinChatMessage>; type UnpinAllChatMessages = TraceRequest<B::UnpinAllChatMessages>; type LeaveChat = TraceRequest<B::LeaveChat>; type GetChat = TraceRequest<B::GetChat>; type GetChatAdministrators = TraceRequest<B::GetChatAdministrators>; type GetChatMembersCount = TraceRequest<B::GetChatMembersCount>; type GetChatMemberCount = TraceRequest<B::GetChatMemberCount>; type GetChatMember = TraceRequest<B::GetChatMember>; type SetChatStickerSet = TraceRequest<B::SetChatStickerSet>; type DeleteChatStickerSet = TraceRequest<B::DeleteChatStickerSet>; type AnswerCallbackQuery = TraceRequest<B::AnswerCallbackQuery>; type SetMyCommands = TraceRequest<B::SetMyCommands>; type GetMyCommands = TraceRequest<B::GetMyCommands>; type SetChatMenuButton = TraceRequest<B::SetChatMenuButton>; type GetChatMenuButton = TraceRequest<B::GetChatMenuButton>; type SetMyDefaultAdministratorRights = TraceRequest<B::SetMyDefaultAdministratorRights>; type GetMyDefaultAdministratorRights = TraceRequest<B::GetMyDefaultAdministratorRights>; type DeleteMyCommands = TraceRequest<B::DeleteMyCommands>; type AnswerInlineQuery = TraceRequest<B::AnswerInlineQuery>; type AnswerWebAppQuery = TraceRequest<B::AnswerWebAppQuery>; type EditMessageText = TraceRequest<B::EditMessageText>; type EditMessageTextInline = TraceRequest<B::EditMessageTextInline>; type EditMessageCaption = TraceRequest<B::EditMessageCaption>; type EditMessageCaptionInline = TraceRequest<B::EditMessageCaptionInline>; type EditMessageMedia = TraceRequest<B::EditMessageMedia>; type EditMessageMediaInline = TraceRequest<B::EditMessageMediaInline>; type EditMessageReplyMarkup = TraceRequest<B::EditMessageReplyMarkup>; type EditMessageReplyMarkupInline = TraceRequest<B::EditMessageReplyMarkupInline>; type StopPoll = TraceRequest<B::StopPoll>; type DeleteMessage = TraceRequest<B::DeleteMessage>; type SendSticker = TraceRequest<B::SendSticker>; type GetStickerSet = TraceRequest<B::GetStickerSet>; type GetCustomEmojiStickers = TraceRequest<B::GetCustomEmojiStickers>; type UploadStickerFile = TraceRequest<B::UploadStickerFile>; type CreateNewStickerSet = TraceRequest<B::CreateNewStickerSet>; type AddStickerToSet = TraceRequest<B::AddStickerToSet>; type SetStickerPositionInSet = TraceRequest<B::SetStickerPositionInSet>; type DeleteStickerFromSet = TraceRequest<B::DeleteStickerFromSet>; type SetStickerSetThumb = TraceRequest<B::SetStickerSetThumb>; type SendInvoice = TraceRequest<B::SendInvoice>; type CreateInvoiceLink = TraceRequest<B::CreateInvoiceLink>; type AnswerShippingQuery = TraceRequest<B::AnswerShippingQuery>; type AnswerPreCheckoutQuery = TraceRequest<B::AnswerPreCheckoutQuery>; type SetPassportDataErrors = TraceRequest<B::SetPassportDataErrors>; type SendGame = TraceRequest<B::SendGame>; type SetGameScore = TraceRequest<B::SetGameScore>; type SetGameScoreInline = TraceRequest<B::SetGameScoreInline>; type GetGameHighScores = TraceRequest<B::GetGameHighScores>; type ApproveChatJoinRequest = TraceRequest<B::ApproveChatJoinRequest>; type DeclineChatJoinRequest = TraceRequest<B::DeclineChatJoinRequest>;where
Self: Sized,
B: Requester, type Err = B::Err; type GetMe = TraceRequest<B::GetMe>; type LogOut = TraceRequest<B::LogOut>; type Close = TraceRequest<B::Close>; type GetUpdates = TraceRequest<B::GetUpdates>; type SetWebhook = TraceRequest<B::SetWebhook>; type DeleteWebhook = TraceRequest<B::DeleteWebhook>; type GetWebhookInfo = TraceRequest<B::GetWebhookInfo>; type ForwardMessage = TraceRequest<B::ForwardMessage>; type CopyMessage = TraceRequest<B::CopyMessage>; type SendMessage = TraceRequest<B::SendMessage>; type SendPhoto = TraceRequest<B::SendPhoto>; type SendAudio = TraceRequest<B::SendAudio>; type SendDocument = TraceRequest<B::SendDocument>; type SendVideo = TraceRequest<B::SendVideo>; type SendAnimation = TraceRequest<B::SendAnimation>; type SendVoice = TraceRequest<B::SendVoice>; type SendVideoNote = TraceRequest<B::SendVideoNote>; type SendMediaGroup = TraceRequest<B::SendMediaGroup>; type SendLocation = TraceRequest<B::SendLocation>; type EditMessageLiveLocation = TraceRequest<B::EditMessageLiveLocation>; type EditMessageLiveLocationInline = TraceRequest<B::EditMessageLiveLocationInline>; type StopMessageLiveLocation = TraceRequest<B::StopMessageLiveLocation>; type StopMessageLiveLocationInline = TraceRequest<B::StopMessageLiveLocationInline>; type SendVenue = TraceRequest<B::SendVenue>; type SendContact = TraceRequest<B::SendContact>; type SendPoll = TraceRequest<B::SendPoll>; type SendDice = TraceRequest<B::SendDice>; type SendChatAction = TraceRequest<B::SendChatAction>; type GetUserProfilePhotos = TraceRequest<B::GetUserProfilePhotos>; type GetFile = TraceRequest<B::GetFile>; type KickChatMember = TraceRequest<B::KickChatMember>; type BanChatMember = TraceRequest<B::BanChatMember>; type UnbanChatMember = TraceRequest<B::UnbanChatMember>; type RestrictChatMember = TraceRequest<B::RestrictChatMember>; type PromoteChatMember = TraceRequest<B::PromoteChatMember>; type SetChatAdministratorCustomTitle = TraceRequest<B::SetChatAdministratorCustomTitle>; type BanChatSenderChat = TraceRequest<B::BanChatSenderChat>; type UnbanChatSenderChat = TraceRequest<B::UnbanChatSenderChat>; type SetChatPermissions = TraceRequest<B::SetChatPermissions>; type ExportChatInviteLink = TraceRequest<B::ExportChatInviteLink>; type CreateChatInviteLink = TraceRequest<B::CreateChatInviteLink>; type EditChatInviteLink = TraceRequest<B::EditChatInviteLink>; type RevokeChatInviteLink = TraceRequest<B::RevokeChatInviteLink>; type SetChatPhoto = TraceRequest<B::SetChatPhoto>; type DeleteChatPhoto = TraceRequest<B::DeleteChatPhoto>; type SetChatTitle = TraceRequest<B::SetChatTitle>; type SetChatDescription = TraceRequest<B::SetChatDescription>; type PinChatMessage = TraceRequest<B::PinChatMessage>; type UnpinChatMessage = TraceRequest<B::UnpinChatMessage>; type UnpinAllChatMessages = TraceRequest<B::UnpinAllChatMessages>; type LeaveChat = TraceRequest<B::LeaveChat>; type GetChat = TraceRequest<B::GetChat>; type GetChatAdministrators = TraceRequest<B::GetChatAdministrators>; type GetChatMembersCount = TraceRequest<B::GetChatMembersCount>; type GetChatMemberCount = TraceRequest<B::GetChatMemberCount>; type GetChatMember = TraceRequest<B::GetChatMember>; type SetChatStickerSet = TraceRequest<B::SetChatStickerSet>; type DeleteChatStickerSet = TraceRequest<B::DeleteChatStickerSet>; type AnswerCallbackQuery = TraceRequest<B::AnswerCallbackQuery>; type SetMyCommands = TraceRequest<B::SetMyCommands>; type GetMyCommands = TraceRequest<B::GetMyCommands>; type SetChatMenuButton = TraceRequest<B::SetChatMenuButton>; type GetChatMenuButton = TraceRequest<B::GetChatMenuButton>; type SetMyDefaultAdministratorRights = TraceRequest<B::SetMyDefaultAdministratorRights>; type GetMyDefaultAdministratorRights = TraceRequest<B::GetMyDefaultAdministratorRights>; type DeleteMyCommands = TraceRequest<B::DeleteMyCommands>; type AnswerInlineQuery = TraceRequest<B::AnswerInlineQuery>; type AnswerWebAppQuery = TraceRequest<B::AnswerWebAppQuery>; type EditMessageText = TraceRequest<B::EditMessageText>; type EditMessageTextInline = TraceRequest<B::EditMessageTextInline>; type EditMessageCaption = TraceRequest<B::EditMessageCaption>; type EditMessageCaptionInline = TraceRequest<B::EditMessageCaptionInline>; type EditMessageMedia = TraceRequest<B::EditMessageMedia>; type EditMessageMediaInline = TraceRequest<B::EditMessageMediaInline>; type EditMessageReplyMarkup = TraceRequest<B::EditMessageReplyMarkup>; type EditMessageReplyMarkupInline = TraceRequest<B::EditMessageReplyMarkupInline>; type StopPoll = TraceRequest<B::StopPoll>; type DeleteMessage = TraceRequest<B::DeleteMessage>; type SendSticker = TraceRequest<B::SendSticker>; type GetStickerSet = TraceRequest<B::GetStickerSet>; type GetCustomEmojiStickers = TraceRequest<B::GetCustomEmojiStickers>; type UploadStickerFile = TraceRequest<B::UploadStickerFile>; type CreateNewStickerSet = TraceRequest<B::CreateNewStickerSet>; type AddStickerToSet = TraceRequest<B::AddStickerToSet>; type SetStickerPositionInSet = TraceRequest<B::SetStickerPositionInSet>; type DeleteStickerFromSet = TraceRequest<B::DeleteStickerFromSet>; type SetStickerSetThumb = TraceRequest<B::SetStickerSetThumb>; type SendInvoice = TraceRequest<B::SendInvoice>; type CreateInvoiceLink = TraceRequest<B::CreateInvoiceLink>; type AnswerShippingQuery = TraceRequest<B::AnswerShippingQuery>; type AnswerPreCheckoutQuery = TraceRequest<B::AnswerPreCheckoutQuery>; type SetPassportDataErrors = TraceRequest<B::SetPassportDataErrors>; type SendGame = TraceRequest<B::SendGame>; type SetGameScore = TraceRequest<B::SetGameScore>; type SetGameScoreInline = TraceRequest<B::SetGameScoreInline>; type GetGameHighScores = TraceRequest<B::GetGameHighScores>; type ApproveChatJoinRequest = TraceRequest<B::ApproveChatJoinRequest>; type DeclineChatJoinRequest = TraceRequest<B::DeclineChatJoinRequest>;
Available on crate feature
trace_adaptor only.Trace requests, see Trace for more.
Examples found in repository?
examples/erased.rs (line 37)
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
async fn main() -> Result<(), Box<dyn std::error::Error>> {
pretty_env_logger::init();
let chat_id = ChatId(
std::env::var("CHAT_ID")
.expect("Expected CHAT_ID env var")
.parse::<i64>()?,
);
let trace_settings = match std::env::var("TRACE").as_deref() {
Ok("EVERYTHING_VERBOSE") => trace::Settings::TRACE_EVERYTHING_VERBOSE,
Ok("EVERYTHING") => trace::Settings::TRACE_EVERYTHING,
Ok("REQUESTS_VERBOSE") => trace::Settings::TRACE_REQUESTS_VERBOSE,
Ok("REQUESTS") => trace::Settings::TRACE_REQUESTS,
Ok("RESPONSES_VERBOSE") => trace::Settings::TRACE_RESPONSES_VERBOSE,
Ok("RESPONSES") => trace::Settings::TRACE_RESPONSES,
Ok("EMPTY") | Ok("") | Err(VarError::NotPresent) => trace::Settings::empty(),
Ok(_) | Err(VarError::NotUnicode(_)) => {
panic!(
"Expected `TRACE` environment variable to be equal to any of the following: \
`EVERYTHING_VERBOSE`, `EVERYTHING`, `REQUESTS_VERBOSE`, `REQUESTS`, \
`RESPONSES_VERBOSE`, `RESPONSES`, `EMPTY`, `` (empty string)"
)
}
};
log::info!("Trace settings: {:?}", trace_settings);
let bot = if trace_settings.is_empty() {
Bot::from_env().erase()
} else {
Bot::from_env().trace(trace_settings).erase()
};
bot.send_chat_action(chat_id, ChatAction::Typing).await?;
tokio::time::sleep(Duration::from_secs(1)).await;
bot.send_message(chat_id, "Hey hey hey").await?;
Ok(())
}sourcefn throttle(self, limits: Limits) -> Throttle<Self>ⓘNotable traits for Throttle<B>impl<B: Requester> Requester for Throttle<B>where
B::Err: AsResponseParameters,
B::SendMessage: Clone + Send + Sync + 'static,
B::ForwardMessage: Clone + Send + Sync + 'static,
B::CopyMessage: Clone + Send + Sync + 'static,
B::SendPhoto: Clone + Send + Sync + 'static,
B::SendAudio: Clone + Send + Sync + 'static,
B::SendDocument: Clone + Send + Sync + 'static,
B::SendVideo: Clone + Send + Sync + 'static,
B::SendAnimation: Clone + Send + Sync + 'static,
B::SendVoice: Clone + Send + Sync + 'static,
B::SendVideoNote: Clone + Send + Sync + 'static,
B::SendMediaGroup: Clone + Send + Sync + 'static,
B::SendLocation: Clone + Send + Sync + 'static,
B::SendVenue: Clone + Send + Sync + 'static,
B::SendContact: Clone + Send + Sync + 'static,
B::SendPoll: Clone + Send + Sync + 'static,
B::SendDice: Clone + Send + Sync + 'static,
B::SendSticker: Clone + Send + Sync + 'static,
B::SendInvoice: Clone + Send + Sync + 'static, type Err = B::Err; type SendMessage = ThrottlingRequest<B::SendMessage>; type ForwardMessage = ThrottlingRequest<B::ForwardMessage>; type CopyMessage = ThrottlingRequest<B::CopyMessage>; type SendPhoto = ThrottlingRequest<B::SendPhoto>; type SendAudio = ThrottlingRequest<B::SendAudio>; type SendDocument = ThrottlingRequest<B::SendDocument>; type SendVideo = ThrottlingRequest<B::SendVideo>; type SendAnimation = ThrottlingRequest<B::SendAnimation>; type SendVoice = ThrottlingRequest<B::SendVoice>; type SendVideoNote = ThrottlingRequest<B::SendVideoNote>; type SendMediaGroup = ThrottlingRequest<B::SendMediaGroup>; type SendLocation = ThrottlingRequest<B::SendLocation>; type SendVenue = ThrottlingRequest<B::SendVenue>; type SendContact = ThrottlingRequest<B::SendContact>; type SendPoll = ThrottlingRequest<B::SendPoll>; type SendDice = ThrottlingRequest<B::SendDice>; type SendSticker = ThrottlingRequest<B::SendSticker>; type SendInvoice = ThrottlingRequest<B::SendInvoice>; type GetMe = B::GetMe; type LogOut = B::LogOut; type Close = B::Close; type GetUpdates = B::GetUpdates; type SetWebhook = B::SetWebhook; type DeleteWebhook = B::DeleteWebhook; type GetWebhookInfo = B::GetWebhookInfo; type EditMessageLiveLocation = B::EditMessageLiveLocation; type EditMessageLiveLocationInline = B::EditMessageLiveLocationInline; type StopMessageLiveLocation = B::StopMessageLiveLocation; type StopMessageLiveLocationInline = B::StopMessageLiveLocationInline; type SendChatAction = B::SendChatAction; type GetUserProfilePhotos = B::GetUserProfilePhotos; type GetFile = B::GetFile; type KickChatMember = B::KickChatMember; type BanChatMember = B::BanChatMember; type UnbanChatMember = B::UnbanChatMember; type RestrictChatMember = B::RestrictChatMember; type PromoteChatMember = B::PromoteChatMember; type SetChatAdministratorCustomTitle = B::SetChatAdministratorCustomTitle; type BanChatSenderChat = B::BanChatSenderChat; type UnbanChatSenderChat = B::UnbanChatSenderChat; type SetChatPermissions = B::SetChatPermissions; type ExportChatInviteLink = B::ExportChatInviteLink; type CreateChatInviteLink = B::CreateChatInviteLink; type EditChatInviteLink = B::EditChatInviteLink; type RevokeChatInviteLink = B::RevokeChatInviteLink; type SetChatPhoto = B::SetChatPhoto; type DeleteChatPhoto = B::DeleteChatPhoto; type SetChatTitle = B::SetChatTitle; type SetChatDescription = B::SetChatDescription; type PinChatMessage = B::PinChatMessage; type UnpinChatMessage = B::UnpinChatMessage; type UnpinAllChatMessages = B::UnpinAllChatMessages; type LeaveChat = B::LeaveChat; type GetChat = B::GetChat; type GetChatAdministrators = B::GetChatAdministrators; type GetChatMembersCount = B::GetChatMembersCount; type GetChatMemberCount = B::GetChatMemberCount; type GetChatMember = B::GetChatMember; type SetChatStickerSet = B::SetChatStickerSet; type DeleteChatStickerSet = B::DeleteChatStickerSet; type AnswerCallbackQuery = B::AnswerCallbackQuery; type SetMyCommands = B::SetMyCommands; type GetMyCommands = B::GetMyCommands; type SetChatMenuButton = B::SetChatMenuButton; type GetChatMenuButton = B::GetChatMenuButton; type SetMyDefaultAdministratorRights = B::SetMyDefaultAdministratorRights; type GetMyDefaultAdministratorRights = B::GetMyDefaultAdministratorRights; type DeleteMyCommands = B::DeleteMyCommands; type AnswerInlineQuery = B::AnswerInlineQuery; type AnswerWebAppQuery = B::AnswerWebAppQuery; type EditMessageText = B::EditMessageText; type EditMessageTextInline = B::EditMessageTextInline; type EditMessageCaption = B::EditMessageCaption; type EditMessageCaptionInline = B::EditMessageCaptionInline; type EditMessageMedia = B::EditMessageMedia; type EditMessageMediaInline = B::EditMessageMediaInline; type EditMessageReplyMarkup = B::EditMessageReplyMarkup; type EditMessageReplyMarkupInline = B::EditMessageReplyMarkupInline; type StopPoll = B::StopPoll; type DeleteMessage = B::DeleteMessage; type GetStickerSet = B::GetStickerSet; type GetCustomEmojiStickers = B::GetCustomEmojiStickers; type UploadStickerFile = B::UploadStickerFile; type CreateNewStickerSet = B::CreateNewStickerSet; type AddStickerToSet = B::AddStickerToSet; type SetStickerPositionInSet = B::SetStickerPositionInSet; type DeleteStickerFromSet = B::DeleteStickerFromSet; type SetStickerSetThumb = B::SetStickerSetThumb; type AnswerShippingQuery = B::AnswerShippingQuery; type CreateInvoiceLink = B::CreateInvoiceLink; type AnswerPreCheckoutQuery = B::AnswerPreCheckoutQuery; type SetPassportDataErrors = B::SetPassportDataErrors; type SendGame = B::SendGame; type SetGameScore = B::SetGameScore; type SetGameScoreInline = B::SetGameScoreInline; type ApproveChatJoinRequest = B::ApproveChatJoinRequest; type DeclineChatJoinRequest = B::DeclineChatJoinRequest; type GetGameHighScores = B::GetGameHighScores;where
Self: Sized + Clone + Send + Sync + 'static,
Self::Err: AsResponseParameters,
Self::GetChat: Send,
fn throttle(self, limits: Limits) -> Throttle<Self>ⓘNotable traits for Throttle<B>impl<B: Requester> Requester for Throttle<B>where
B::Err: AsResponseParameters,
B::SendMessage: Clone + Send + Sync + 'static,
B::ForwardMessage: Clone + Send + Sync + 'static,
B::CopyMessage: Clone + Send + Sync + 'static,
B::SendPhoto: Clone + Send + Sync + 'static,
B::SendAudio: Clone + Send + Sync + 'static,
B::SendDocument: Clone + Send + Sync + 'static,
B::SendVideo: Clone + Send + Sync + 'static,
B::SendAnimation: Clone + Send + Sync + 'static,
B::SendVoice: Clone + Send + Sync + 'static,
B::SendVideoNote: Clone + Send + Sync + 'static,
B::SendMediaGroup: Clone + Send + Sync + 'static,
B::SendLocation: Clone + Send + Sync + 'static,
B::SendVenue: Clone + Send + Sync + 'static,
B::SendContact: Clone + Send + Sync + 'static,
B::SendPoll: Clone + Send + Sync + 'static,
B::SendDice: Clone + Send + Sync + 'static,
B::SendSticker: Clone + Send + Sync + 'static,
B::SendInvoice: Clone + Send + Sync + 'static, type Err = B::Err; type SendMessage = ThrottlingRequest<B::SendMessage>; type ForwardMessage = ThrottlingRequest<B::ForwardMessage>; type CopyMessage = ThrottlingRequest<B::CopyMessage>; type SendPhoto = ThrottlingRequest<B::SendPhoto>; type SendAudio = ThrottlingRequest<B::SendAudio>; type SendDocument = ThrottlingRequest<B::SendDocument>; type SendVideo = ThrottlingRequest<B::SendVideo>; type SendAnimation = ThrottlingRequest<B::SendAnimation>; type SendVoice = ThrottlingRequest<B::SendVoice>; type SendVideoNote = ThrottlingRequest<B::SendVideoNote>; type SendMediaGroup = ThrottlingRequest<B::SendMediaGroup>; type SendLocation = ThrottlingRequest<B::SendLocation>; type SendVenue = ThrottlingRequest<B::SendVenue>; type SendContact = ThrottlingRequest<B::SendContact>; type SendPoll = ThrottlingRequest<B::SendPoll>; type SendDice = ThrottlingRequest<B::SendDice>; type SendSticker = ThrottlingRequest<B::SendSticker>; type SendInvoice = ThrottlingRequest<B::SendInvoice>; type GetMe = B::GetMe; type LogOut = B::LogOut; type Close = B::Close; type GetUpdates = B::GetUpdates; type SetWebhook = B::SetWebhook; type DeleteWebhook = B::DeleteWebhook; type GetWebhookInfo = B::GetWebhookInfo; type EditMessageLiveLocation = B::EditMessageLiveLocation; type EditMessageLiveLocationInline = B::EditMessageLiveLocationInline; type StopMessageLiveLocation = B::StopMessageLiveLocation; type StopMessageLiveLocationInline = B::StopMessageLiveLocationInline; type SendChatAction = B::SendChatAction; type GetUserProfilePhotos = B::GetUserProfilePhotos; type GetFile = B::GetFile; type KickChatMember = B::KickChatMember; type BanChatMember = B::BanChatMember; type UnbanChatMember = B::UnbanChatMember; type RestrictChatMember = B::RestrictChatMember; type PromoteChatMember = B::PromoteChatMember; type SetChatAdministratorCustomTitle = B::SetChatAdministratorCustomTitle; type BanChatSenderChat = B::BanChatSenderChat; type UnbanChatSenderChat = B::UnbanChatSenderChat; type SetChatPermissions = B::SetChatPermissions; type ExportChatInviteLink = B::ExportChatInviteLink; type CreateChatInviteLink = B::CreateChatInviteLink; type EditChatInviteLink = B::EditChatInviteLink; type RevokeChatInviteLink = B::RevokeChatInviteLink; type SetChatPhoto = B::SetChatPhoto; type DeleteChatPhoto = B::DeleteChatPhoto; type SetChatTitle = B::SetChatTitle; type SetChatDescription = B::SetChatDescription; type PinChatMessage = B::PinChatMessage; type UnpinChatMessage = B::UnpinChatMessage; type UnpinAllChatMessages = B::UnpinAllChatMessages; type LeaveChat = B::LeaveChat; type GetChat = B::GetChat; type GetChatAdministrators = B::GetChatAdministrators; type GetChatMembersCount = B::GetChatMembersCount; type GetChatMemberCount = B::GetChatMemberCount; type GetChatMember = B::GetChatMember; type SetChatStickerSet = B::SetChatStickerSet; type DeleteChatStickerSet = B::DeleteChatStickerSet; type AnswerCallbackQuery = B::AnswerCallbackQuery; type SetMyCommands = B::SetMyCommands; type GetMyCommands = B::GetMyCommands; type SetChatMenuButton = B::SetChatMenuButton; type GetChatMenuButton = B::GetChatMenuButton; type SetMyDefaultAdministratorRights = B::SetMyDefaultAdministratorRights; type GetMyDefaultAdministratorRights = B::GetMyDefaultAdministratorRights; type DeleteMyCommands = B::DeleteMyCommands; type AnswerInlineQuery = B::AnswerInlineQuery; type AnswerWebAppQuery = B::AnswerWebAppQuery; type EditMessageText = B::EditMessageText; type EditMessageTextInline = B::EditMessageTextInline; type EditMessageCaption = B::EditMessageCaption; type EditMessageCaptionInline = B::EditMessageCaptionInline; type EditMessageMedia = B::EditMessageMedia; type EditMessageMediaInline = B::EditMessageMediaInline; type EditMessageReplyMarkup = B::EditMessageReplyMarkup; type EditMessageReplyMarkupInline = B::EditMessageReplyMarkupInline; type StopPoll = B::StopPoll; type DeleteMessage = B::DeleteMessage; type GetStickerSet = B::GetStickerSet; type GetCustomEmojiStickers = B::GetCustomEmojiStickers; type UploadStickerFile = B::UploadStickerFile; type CreateNewStickerSet = B::CreateNewStickerSet; type AddStickerToSet = B::AddStickerToSet; type SetStickerPositionInSet = B::SetStickerPositionInSet; type DeleteStickerFromSet = B::DeleteStickerFromSet; type SetStickerSetThumb = B::SetStickerSetThumb; type AnswerShippingQuery = B::AnswerShippingQuery; type CreateInvoiceLink = B::CreateInvoiceLink; type AnswerPreCheckoutQuery = B::AnswerPreCheckoutQuery; type SetPassportDataErrors = B::SetPassportDataErrors; type SendGame = B::SendGame; type SetGameScore = B::SetGameScore; type SetGameScoreInline = B::SetGameScoreInline; type ApproveChatJoinRequest = B::ApproveChatJoinRequest; type DeclineChatJoinRequest = B::DeclineChatJoinRequest; type GetGameHighScores = B::GetGameHighScores;where
Self: Sized + Clone + Send + Sync + 'static,
Self::Err: AsResponseParameters,
Self::GetChat: Send,
B::Err: AsResponseParameters,
B::SendMessage: Clone + Send + Sync + 'static,
B::ForwardMessage: Clone + Send + Sync + 'static,
B::CopyMessage: Clone + Send + Sync + 'static,
B::SendPhoto: Clone + Send + Sync + 'static,
B::SendAudio: Clone + Send + Sync + 'static,
B::SendDocument: Clone + Send + Sync + 'static,
B::SendVideo: Clone + Send + Sync + 'static,
B::SendAnimation: Clone + Send + Sync + 'static,
B::SendVoice: Clone + Send + Sync + 'static,
B::SendVideoNote: Clone + Send + Sync + 'static,
B::SendMediaGroup: Clone + Send + Sync + 'static,
B::SendLocation: Clone + Send + Sync + 'static,
B::SendVenue: Clone + Send + Sync + 'static,
B::SendContact: Clone + Send + Sync + 'static,
B::SendPoll: Clone + Send + Sync + 'static,
B::SendDice: Clone + Send + Sync + 'static,
B::SendSticker: Clone + Send + Sync + 'static,
B::SendInvoice: Clone + Send + Sync + 'static, type Err = B::Err; type SendMessage = ThrottlingRequest<B::SendMessage>; type ForwardMessage = ThrottlingRequest<B::ForwardMessage>; type CopyMessage = ThrottlingRequest<B::CopyMessage>; type SendPhoto = ThrottlingRequest<B::SendPhoto>; type SendAudio = ThrottlingRequest<B::SendAudio>; type SendDocument = ThrottlingRequest<B::SendDocument>; type SendVideo = ThrottlingRequest<B::SendVideo>; type SendAnimation = ThrottlingRequest<B::SendAnimation>; type SendVoice = ThrottlingRequest<B::SendVoice>; type SendVideoNote = ThrottlingRequest<B::SendVideoNote>; type SendMediaGroup = ThrottlingRequest<B::SendMediaGroup>; type SendLocation = ThrottlingRequest<B::SendLocation>; type SendVenue = ThrottlingRequest<B::SendVenue>; type SendContact = ThrottlingRequest<B::SendContact>; type SendPoll = ThrottlingRequest<B::SendPoll>; type SendDice = ThrottlingRequest<B::SendDice>; type SendSticker = ThrottlingRequest<B::SendSticker>; type SendInvoice = ThrottlingRequest<B::SendInvoice>; type GetMe = B::GetMe; type LogOut = B::LogOut; type Close = B::Close; type GetUpdates = B::GetUpdates; type SetWebhook = B::SetWebhook; type DeleteWebhook = B::DeleteWebhook; type GetWebhookInfo = B::GetWebhookInfo; type EditMessageLiveLocation = B::EditMessageLiveLocation; type EditMessageLiveLocationInline = B::EditMessageLiveLocationInline; type StopMessageLiveLocation = B::StopMessageLiveLocation; type StopMessageLiveLocationInline = B::StopMessageLiveLocationInline; type SendChatAction = B::SendChatAction; type GetUserProfilePhotos = B::GetUserProfilePhotos; type GetFile = B::GetFile; type KickChatMember = B::KickChatMember; type BanChatMember = B::BanChatMember; type UnbanChatMember = B::UnbanChatMember; type RestrictChatMember = B::RestrictChatMember; type PromoteChatMember = B::PromoteChatMember; type SetChatAdministratorCustomTitle = B::SetChatAdministratorCustomTitle; type BanChatSenderChat = B::BanChatSenderChat; type UnbanChatSenderChat = B::UnbanChatSenderChat; type SetChatPermissions = B::SetChatPermissions; type ExportChatInviteLink = B::ExportChatInviteLink; type CreateChatInviteLink = B::CreateChatInviteLink; type EditChatInviteLink = B::EditChatInviteLink; type RevokeChatInviteLink = B::RevokeChatInviteLink; type SetChatPhoto = B::SetChatPhoto; type DeleteChatPhoto = B::DeleteChatPhoto; type SetChatTitle = B::SetChatTitle; type SetChatDescription = B::SetChatDescription; type PinChatMessage = B::PinChatMessage; type UnpinChatMessage = B::UnpinChatMessage; type UnpinAllChatMessages = B::UnpinAllChatMessages; type LeaveChat = B::LeaveChat; type GetChat = B::GetChat; type GetChatAdministrators = B::GetChatAdministrators; type GetChatMembersCount = B::GetChatMembersCount; type GetChatMemberCount = B::GetChatMemberCount; type GetChatMember = B::GetChatMember; type SetChatStickerSet = B::SetChatStickerSet; type DeleteChatStickerSet = B::DeleteChatStickerSet; type AnswerCallbackQuery = B::AnswerCallbackQuery; type SetMyCommands = B::SetMyCommands; type GetMyCommands = B::GetMyCommands; type SetChatMenuButton = B::SetChatMenuButton; type GetChatMenuButton = B::GetChatMenuButton; type SetMyDefaultAdministratorRights = B::SetMyDefaultAdministratorRights; type GetMyDefaultAdministratorRights = B::GetMyDefaultAdministratorRights; type DeleteMyCommands = B::DeleteMyCommands; type AnswerInlineQuery = B::AnswerInlineQuery; type AnswerWebAppQuery = B::AnswerWebAppQuery; type EditMessageText = B::EditMessageText; type EditMessageTextInline = B::EditMessageTextInline; type EditMessageCaption = B::EditMessageCaption; type EditMessageCaptionInline = B::EditMessageCaptionInline; type EditMessageMedia = B::EditMessageMedia; type EditMessageMediaInline = B::EditMessageMediaInline; type EditMessageReplyMarkup = B::EditMessageReplyMarkup; type EditMessageReplyMarkupInline = B::EditMessageReplyMarkupInline; type StopPoll = B::StopPoll; type DeleteMessage = B::DeleteMessage; type GetStickerSet = B::GetStickerSet; type GetCustomEmojiStickers = B::GetCustomEmojiStickers; type UploadStickerFile = B::UploadStickerFile; type CreateNewStickerSet = B::CreateNewStickerSet; type AddStickerToSet = B::AddStickerToSet; type SetStickerPositionInSet = B::SetStickerPositionInSet; type DeleteStickerFromSet = B::DeleteStickerFromSet; type SetStickerSetThumb = B::SetStickerSetThumb; type AnswerShippingQuery = B::AnswerShippingQuery; type CreateInvoiceLink = B::CreateInvoiceLink; type AnswerPreCheckoutQuery = B::AnswerPreCheckoutQuery; type SetPassportDataErrors = B::SetPassportDataErrors; type SendGame = B::SendGame; type SetGameScore = B::SetGameScore; type SetGameScoreInline = B::SetGameScoreInline; type ApproveChatJoinRequest = B::ApproveChatJoinRequest; type DeclineChatJoinRequest = B::DeclineChatJoinRequest; type GetGameHighScores = B::GetGameHighScores;
Available on crate feature
throttle only.Add throttling ability, see Throttle for more.
Note: this spawns the worker, just as Throttle::new_spawn.
sourcefn parse_mode(self, parse_mode: ParseMode) -> DefaultParseMode<Self>ⓘNotable traits for DefaultParseMode<B>impl<B: Requester> Requester for DefaultParseMode<B> type Err = B::Err; type SendMessage = B::SendMessage; type SendPhoto = B::SendPhoto; type SendVideo = B::SendVideo; type SendAudio = B::SendAudio; type SendDocument = B::SendDocument; type SendAnimation = B::SendAnimation; type SendVoice = B::SendVoice; type EditMessageText = B::EditMessageText; type EditMessageTextInline = B::EditMessageTextInline; type EditMessageCaption = B::EditMessageCaption; type EditMessageCaptionInline = B::EditMessageCaptionInline; type SendPoll = B::SendPoll; type GetMe = B::GetMe; type LogOut = B::LogOut; type Close = B::Close; type GetUpdates = B::GetUpdates; type SetWebhook = B::SetWebhook; type DeleteWebhook = B::DeleteWebhook; type GetWebhookInfo = B::GetWebhookInfo; type ForwardMessage = B::ForwardMessage; type CopyMessage = B::CopyMessage; type SendVideoNote = B::SendVideoNote; type SendMediaGroup = B::SendMediaGroup; type SendLocation = B::SendLocation; type EditMessageLiveLocation = B::EditMessageLiveLocation; type EditMessageLiveLocationInline = B::EditMessageLiveLocationInline; type StopMessageLiveLocation = B::StopMessageLiveLocation; type StopMessageLiveLocationInline = B::StopMessageLiveLocationInline; type SendVenue = B::SendVenue; type SendContact = B::SendContact; type SendDice = B::SendDice; type SendChatAction = B::SendChatAction; type GetUserProfilePhotos = B::GetUserProfilePhotos; type GetFile = B::GetFile; type KickChatMember = B::KickChatMember; type BanChatMember = B::BanChatMember; type UnbanChatMember = B::UnbanChatMember; type RestrictChatMember = B::RestrictChatMember; type PromoteChatMember = B::PromoteChatMember; type SetChatAdministratorCustomTitle = B::SetChatAdministratorCustomTitle; type BanChatSenderChat = B::BanChatSenderChat; type UnbanChatSenderChat = B::UnbanChatSenderChat; type SetChatPermissions = B::SetChatPermissions; type ExportChatInviteLink = B::ExportChatInviteLink; type CreateChatInviteLink = B::CreateChatInviteLink; type EditChatInviteLink = B::EditChatInviteLink; type RevokeChatInviteLink = B::RevokeChatInviteLink; type SetChatPhoto = B::SetChatPhoto; type DeleteChatPhoto = B::DeleteChatPhoto; type SetChatTitle = B::SetChatTitle; type SetChatDescription = B::SetChatDescription; type PinChatMessage = B::PinChatMessage; type UnpinChatMessage = B::UnpinChatMessage; type UnpinAllChatMessages = B::UnpinAllChatMessages; type LeaveChat = B::LeaveChat; type GetChat = B::GetChat; type GetChatAdministrators = B::GetChatAdministrators; type GetChatMembersCount = B::GetChatMembersCount; type GetChatMemberCount = B::GetChatMemberCount; type GetChatMember = B::GetChatMember; type SetChatStickerSet = B::SetChatStickerSet; type DeleteChatStickerSet = B::DeleteChatStickerSet; type AnswerCallbackQuery = B::AnswerCallbackQuery; type SetMyCommands = B::SetMyCommands; type GetMyCommands = B::GetMyCommands; type SetChatMenuButton = B::SetChatMenuButton; type GetChatMenuButton = B::GetChatMenuButton; type SetMyDefaultAdministratorRights = B::SetMyDefaultAdministratorRights; type GetMyDefaultAdministratorRights = B::GetMyDefaultAdministratorRights; type DeleteMyCommands = B::DeleteMyCommands; type AnswerInlineQuery = B::AnswerInlineQuery; type AnswerWebAppQuery = B::AnswerWebAppQuery; type EditMessageMedia = B::EditMessageMedia; type EditMessageMediaInline = B::EditMessageMediaInline; type EditMessageReplyMarkup = B::EditMessageReplyMarkup; type EditMessageReplyMarkupInline = B::EditMessageReplyMarkupInline; type StopPoll = B::StopPoll; type DeleteMessage = B::DeleteMessage; type SendSticker = B::SendSticker; type GetStickerSet = B::GetStickerSet; type GetCustomEmojiStickers = B::GetCustomEmojiStickers; type UploadStickerFile = B::UploadStickerFile; type CreateNewStickerSet = B::CreateNewStickerSet; type AddStickerToSet = B::AddStickerToSet; type SetStickerPositionInSet = B::SetStickerPositionInSet; type DeleteStickerFromSet = B::DeleteStickerFromSet; type SetStickerSetThumb = B::SetStickerSetThumb; type SendInvoice = B::SendInvoice; type CreateInvoiceLink = B::CreateInvoiceLink; type AnswerShippingQuery = B::AnswerShippingQuery; type AnswerPreCheckoutQuery = B::AnswerPreCheckoutQuery; type SetPassportDataErrors = B::SetPassportDataErrors; type SendGame = B::SendGame; type SetGameScore = B::SetGameScore; type SetGameScoreInline = B::SetGameScoreInline; type GetGameHighScores = B::GetGameHighScores; type ApproveChatJoinRequest = B::ApproveChatJoinRequest; type DeclineChatJoinRequest = B::DeclineChatJoinRequest;where
Self: Sized,
fn parse_mode(self, parse_mode: ParseMode) -> DefaultParseMode<Self>ⓘNotable traits for DefaultParseMode<B>impl<B: Requester> Requester for DefaultParseMode<B> type Err = B::Err; type SendMessage = B::SendMessage; type SendPhoto = B::SendPhoto; type SendVideo = B::SendVideo; type SendAudio = B::SendAudio; type SendDocument = B::SendDocument; type SendAnimation = B::SendAnimation; type SendVoice = B::SendVoice; type EditMessageText = B::EditMessageText; type EditMessageTextInline = B::EditMessageTextInline; type EditMessageCaption = B::EditMessageCaption; type EditMessageCaptionInline = B::EditMessageCaptionInline; type SendPoll = B::SendPoll; type GetMe = B::GetMe; type LogOut = B::LogOut; type Close = B::Close; type GetUpdates = B::GetUpdates; type SetWebhook = B::SetWebhook; type DeleteWebhook = B::DeleteWebhook; type GetWebhookInfo = B::GetWebhookInfo; type ForwardMessage = B::ForwardMessage; type CopyMessage = B::CopyMessage; type SendVideoNote = B::SendVideoNote; type SendMediaGroup = B::SendMediaGroup; type SendLocation = B::SendLocation; type EditMessageLiveLocation = B::EditMessageLiveLocation; type EditMessageLiveLocationInline = B::EditMessageLiveLocationInline; type StopMessageLiveLocation = B::StopMessageLiveLocation; type StopMessageLiveLocationInline = B::StopMessageLiveLocationInline; type SendVenue = B::SendVenue; type SendContact = B::SendContact; type SendDice = B::SendDice; type SendChatAction = B::SendChatAction; type GetUserProfilePhotos = B::GetUserProfilePhotos; type GetFile = B::GetFile; type KickChatMember = B::KickChatMember; type BanChatMember = B::BanChatMember; type UnbanChatMember = B::UnbanChatMember; type RestrictChatMember = B::RestrictChatMember; type PromoteChatMember = B::PromoteChatMember; type SetChatAdministratorCustomTitle = B::SetChatAdministratorCustomTitle; type BanChatSenderChat = B::BanChatSenderChat; type UnbanChatSenderChat = B::UnbanChatSenderChat; type SetChatPermissions = B::SetChatPermissions; type ExportChatInviteLink = B::ExportChatInviteLink; type CreateChatInviteLink = B::CreateChatInviteLink; type EditChatInviteLink = B::EditChatInviteLink; type RevokeChatInviteLink = B::RevokeChatInviteLink; type SetChatPhoto = B::SetChatPhoto; type DeleteChatPhoto = B::DeleteChatPhoto; type SetChatTitle = B::SetChatTitle; type SetChatDescription = B::SetChatDescription; type PinChatMessage = B::PinChatMessage; type UnpinChatMessage = B::UnpinChatMessage; type UnpinAllChatMessages = B::UnpinAllChatMessages; type LeaveChat = B::LeaveChat; type GetChat = B::GetChat; type GetChatAdministrators = B::GetChatAdministrators; type GetChatMembersCount = B::GetChatMembersCount; type GetChatMemberCount = B::GetChatMemberCount; type GetChatMember = B::GetChatMember; type SetChatStickerSet = B::SetChatStickerSet; type DeleteChatStickerSet = B::DeleteChatStickerSet; type AnswerCallbackQuery = B::AnswerCallbackQuery; type SetMyCommands = B::SetMyCommands; type GetMyCommands = B::GetMyCommands; type SetChatMenuButton = B::SetChatMenuButton; type GetChatMenuButton = B::GetChatMenuButton; type SetMyDefaultAdministratorRights = B::SetMyDefaultAdministratorRights; type GetMyDefaultAdministratorRights = B::GetMyDefaultAdministratorRights; type DeleteMyCommands = B::DeleteMyCommands; type AnswerInlineQuery = B::AnswerInlineQuery; type AnswerWebAppQuery = B::AnswerWebAppQuery; type EditMessageMedia = B::EditMessageMedia; type EditMessageMediaInline = B::EditMessageMediaInline; type EditMessageReplyMarkup = B::EditMessageReplyMarkup; type EditMessageReplyMarkupInline = B::EditMessageReplyMarkupInline; type StopPoll = B::StopPoll; type DeleteMessage = B::DeleteMessage; type SendSticker = B::SendSticker; type GetStickerSet = B::GetStickerSet; type GetCustomEmojiStickers = B::GetCustomEmojiStickers; type UploadStickerFile = B::UploadStickerFile; type CreateNewStickerSet = B::CreateNewStickerSet; type AddStickerToSet = B::AddStickerToSet; type SetStickerPositionInSet = B::SetStickerPositionInSet; type DeleteStickerFromSet = B::DeleteStickerFromSet; type SetStickerSetThumb = B::SetStickerSetThumb; type SendInvoice = B::SendInvoice; type CreateInvoiceLink = B::CreateInvoiceLink; type AnswerShippingQuery = B::AnswerShippingQuery; type AnswerPreCheckoutQuery = B::AnswerPreCheckoutQuery; type SetPassportDataErrors = B::SetPassportDataErrors; type SendGame = B::SendGame; type SetGameScore = B::SetGameScore; type SetGameScoreInline = B::SetGameScoreInline; type GetGameHighScores = B::GetGameHighScores; type ApproveChatJoinRequest = B::ApproveChatJoinRequest; type DeclineChatJoinRequest = B::DeclineChatJoinRequest;where
Self: Sized,
Specifies default ParseMode, which will be used during all calls to:
Examples found in repository?
examples/self_info.rs (line 16)
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
async fn main() -> Result<(), Box<dyn std::error::Error>> {
pretty_env_logger::init();
let chat_id = ChatId(
std::env::var("CHAT_ID")
.expect("Expected CHAT_ID env var")
.parse::<i64>()?,
);
let bot = Bot::from_env().parse_mode(ParseMode::MarkdownV2);
let Me { user: me, .. } = bot.get_me().await?;
bot.send_dice(chat_id).emoji(DiceEmoji::Dice).await?;
bot.send_message(chat_id, format!("Hi, my name is **{}** 👋", me.first_name))
.await?;
Ok(())
}