Struct teloxide::adaptors::CacheMe

source ·
pub struct CacheMe<B> { /* private fields */ }
Expand description

get_me cache.

Bot’s user is hardly ever changed, so sometimes it’s reasonable to cache response from get_me method.

Implementations§

Available on crate feature cache_me only.

Creates new cache.

Note: it’s recommended to use RequesterExt::cache_me instead.

Available on crate feature cache_me only.

Allows to access inner bot

Available on crate feature cache_me only.

Unwraps inner bot

Available on crate feature cache_me only.

Clear cache.

Returns cached response from get_me, if it was cached.

Note: internally this uses Arc::make_mut so this will not clear cache of clones of self.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
An error returned from download_file.
A future returned from download_file.
Download a file from Telegram into destination. Read more
An error returned from download_file_stream.
A stream returned from download_file_stream.
Download a file from Telegram as [Stream]. Read more
Error type returned by all requests.
For Telegram documentation see GetMe.
For Telegram documentation see LogOut.
For Telegram documentation see Close.
For Telegram documentation see GetUpdates.
For Telegram documentation see SetWebhook.
For Telegram documentation see DeleteWebhook.
For Telegram documentation see GetWebhookInfo.
For Telegram documentation see ForwardMessage.
For Telegram documentation see CopyMessage.
For Telegram documentation see SendMessage.
For Telegram documentation see SendPhoto.
For Telegram documentation see SendAudio.
For Telegram documentation see SendDocument.
For Telegram documentation see SendVideo.
For Telegram documentation see SendAnimation.
For Telegram documentation see SendVoice.
For Telegram documentation see SendVideoNote.
For Telegram documentation see SendMediaGroup.
For Telegram documentation see SendLocation.
For Telegram documentation see EditMessageLiveLocation.
For Telegram documentation see EditMessageLiveLocationInline.
For Telegram documentation see StopMessageLiveLocation.
For Telegram documentation see StopMessageLiveLocationInline.
For Telegram documentation see SendVenue.
For Telegram documentation see SendContact.
For Telegram documentation see SendPoll.
For Telegram documentation see SendDice.
For Telegram documentation see SendChatAction.
For Telegram documentation see GetUserProfilePhotos.
For Telegram documentation see GetFile.
For Telegram documentation see KickChatMember.
For Telegram documentation see BanChatMember.
For Telegram documentation see UnbanChatMember.
For Telegram documentation see RestrictChatMember.
For Telegram documentation see PromoteChatMember.
For Telegram documentation see SetChatAdministratorCustomTitle.
For Telegram documentation see BanChatSenderChat.
For Telegram documentation see UnbanChatSenderChat.
For Telegram documentation see SetChatPermissions.
For Telegram documentation see ExportChatInviteLink.
For Telegram documentation see CreateChatInviteLink.
For Telegram documentation see EditChatInviteLink.
For Telegram documentation see RevokeChatInviteLink.
For Telegram documentation see SetChatPhoto.
For Telegram documentation see DeleteChatPhoto.
For Telegram documentation see SetChatTitle.
For Telegram documentation see SetChatDescription.
For Telegram documentation see PinChatMessage.
For Telegram documentation see UnpinChatMessage.
For Telegram documentation see UnpinAllChatMessages.
For Telegram documentation see LeaveChat.
For Telegram documentation see GetChat.
For Telegram documentation see GetChatAdministrators.
For Telegram documentation see GetChatMembersCount.
For Telegram documentation see GetChatMemberCount.
For Telegram documentation see GetChatMember.
For Telegram documentation see SetChatStickerSet.
For Telegram documentation see DeleteChatStickerSet.
For Telegram documentation see GetForumTopicIconStickers.
For Telegram documentation see CreateForumTopic.
For Telegram documentation see EditForumTopic.
For Telegram documentation see CloseForumTopic.
For Telegram documentation see ReopenForumTopic.
For Telegram documentation see DeleteForumTopic.
For Telegram documentation see UnpinAllForumTopicMessages.
For Telegram documentation see EditGeneralForumTopic.
For Telegram documentation see CloseGeneralForumTopic.
For Telegram documentation see ReopenGeneralForumTopic.
For Telegram documentation see HideGeneralForumTopic.
For Telegram documentation see UnhideGeneralForumTopic.
For Telegram documentation see AnswerCallbackQuery.
For Telegram documentation see SetMyCommands.
For Telegram documentation see GetMyCommands.
For Telegram documentation see SetChatMenuButton.
For Telegram documentation see GetChatMenuButton.
For Telegram documentation see SetMyDefaultAdministratorRights.
For Telegram documentation see GetMyDefaultAdministratorRights.
For Telegram documentation see DeleteMyCommands.
For Telegram documentation see AnswerInlineQuery.
For Telegram documentation see AnswerWebAppQuery.
For Telegram documentation see EditMessageText.
For Telegram documentation see EditMessageTextInline.
For Telegram documentation see EditMessageCaption.
For Telegram documentation see EditMessageCaptionInline.
For Telegram documentation see EditMessageMedia.
For Telegram documentation see EditMessageMediaInline.
For Telegram documentation see EditMessageReplyMarkup.
For Telegram documentation see EditMessageReplyMarkupInline.
For Telegram documentation see StopPoll.
For Telegram documentation see DeleteMessage.
For Telegram documentation see SendSticker.
For Telegram documentation see GetStickerSet.
For Telegram documentation see GetCustomEmojiStickers.
For Telegram documentation see UploadStickerFile.
For Telegram documentation see CreateNewStickerSet.
For Telegram documentation see AddStickerToSet.
For Telegram documentation see SetStickerPositionInSet.
For Telegram documentation see DeleteStickerFromSet.
For Telegram documentation see SetStickerSetThumb.
For Telegram documentation see SendInvoice.
For Telegram documentation see CreateInvoiceLink.
For Telegram documentation see AnswerShippingQuery.
For Telegram documentation see AnswerPreCheckoutQuery.
For Telegram documentation see SetPassportDataErrors.
For Telegram documentation see SendGame.
For Telegram documentation see SetGameScore.
For Telegram documentation see SetGameScoreInline.
For Telegram documentation see GetGameHighScores.
For Telegram documentation see ApproveChatJoinRequest.
For Telegram documentation see DeclineChatJoinRequest.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Unerase this erased pointer. Read more
Available on non-enforce_1_1_0_semantics only.
Whether this implementor has acknowledged the 1.1.0 update to unerase’s documented implementation requirements. Read more
Turn this erasable pointer into an erased pointer. Read more

Returns the argument unchanged.

Converts to this type from a reference to the input type.
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Available on crate feature cache_me only.
Add get_me caching ability, see CacheMe for more.
👎Deprecated since 0.8.0: AutoSend is no longer required to .await requests and is now noop
Available on crate feature auto_send only.
Send requests automatically, see AutoSend for more.
Available on crate feature erased only.
Erase requester type.
Available on crate feature trace_adaptor only.
Trace requests, see Trace for more.
Available on crate feature throttle only.
Add throttling ability, see Throttle for more. Read more
Specifies default ParseMode, which will be used during all calls to: Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more