pub struct Bot { /* private fields */ }
Expand description
A requests sender.
This is the main type of the library, it allows to send requests to the Telegram Bot API and download files.
§TBA methods
All TBA methods are located in the Requester
impl for Bot
. This
allows for opt-in behaviours using requester adaptors.
use teloxide_core::prelude::*;
let bot = Bot::new("TOKEN");
dbg!(bot.get_me().await?);
§File download
In the similar way as with TBA methods, file downloading methods are located
in a trait — Download<'_>
. See its documentation for more.
§Clone cost
Bot::clone
is relatively cheap, so if you need to share Bot
, it’s
recommended to clone it, instead of wrapping it in Arc<_>
.
Implementations§
Source§impl Bot
Constructors
impl Bot
Constructors
Sourcepub fn new<S>(token: S) -> Self
pub fn new<S>(token: S) -> Self
Creates a new Bot
with the specified token and the default
http-client.
§Panics
If it cannot create reqwest::Client
.
Sourcepub fn with_client<S>(token: S, client: Client) -> Self
pub fn with_client<S>(token: S, client: Client) -> Self
Creates a new Bot
with the specified token and your
reqwest::Client
.
§Caution
Your custom client might not be configured correctly to be able to work in long time durations, see issue 223.
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Creates a new Bot
with the TELOXIDE_TOKEN
& TELOXIDE_PROXY
environmental variables (a bot’s token & a proxy) and the default
reqwest::Client
.
This function passes the value of TELOXIDE_PROXY
into
reqwest::Proxy::all
, if it exists, otherwise returns the default
client.
§Panics
- If cannot get the
TELOXIDE_TOKEN
environmental variable. - If it cannot create
reqwest::Client
.
Examples found in repository?
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
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(())
}
More examples
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
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(())
}
Sourcepub fn from_env_with_client(client: Client) -> Self
pub fn from_env_with_client(client: Client) -> Self
Creates a new Bot
with the TELOXIDE_TOKEN
environmental variable (a
bot’s token) and your reqwest::Client
.
§Panics
If cannot get the TELOXIDE_TOKEN
environmental variable.
§Caution
Your custom client might not be configured correctly to be able to work in long time durations, see issue 223.
Sourcepub fn set_api_url(self, url: Url) -> Self
pub fn set_api_url(self, url: Url) -> Self
Sets a custom API URL.
For example, you can run your own Telegram bot API server and set its URL using this method.
§Examples
use teloxide_core::{
requests::{Request, Requester},
Bot,
};
let url = reqwest::Url::parse("https://localhost/tbas").unwrap();
let bot = Bot::new("TOKEN").set_api_url(url);
// From now all methods will use "https://localhost/tbas" as an API URL.
bot.get_me().await
§Multi-instance behaviour
This method only sets the url for one bot instace, older clones are unaffected.
use teloxide_core::Bot;
let bot = Bot::new("TOKEN");
let bot2 = bot.clone();
let bot = bot.set_api_url(reqwest::Url::parse("https://example.com/").unwrap());
assert_eq!(bot.api_url().as_str(), "https://example.com/");
assert_eq!(bot.clone().api_url().as_str(), "https://example.com/");
assert_ne!(bot2.api_url().as_str(), "https://example.com/");
Trait Implementations§
Source§impl Download for Bot
impl Download for Bot
Source§type Err<'dst> = DownloadError
type Err<'dst> = DownloadError
download_file
.Source§type Fut<'dst> = Pin<Box<dyn Future<Output = Result<(), DownloadError>> + Send + 'dst>>
type Fut<'dst> = Pin<Box<dyn Future<Output = Result<(), DownloadError>> + Send + 'dst>>
download_file
.Source§type StreamErr = Error
type StreamErr = Error
download_file_stream
.Source§type Stream = Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send>>
type Stream = Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send>>
download_file_stream
.Source§fn download_file<'dst>(
&self,
path: &str,
destination: &'dst mut (dyn AsyncWrite + Unpin + Send),
) -> Self::Fut<'dst>
fn download_file<'dst>( &self, path: &str, destination: &'dst mut (dyn AsyncWrite + Unpin + Send), ) -> Self::Fut<'dst>
destination
. Read moreSource§impl Requester for Bot
impl Requester for Bot
Source§type Err = RequestError
type Err = RequestError
type GetUpdates = JsonRequest<GetUpdates>
type SetWebhook = MultipartRequest<SetWebhook>
type DeleteWebhook = JsonRequest<DeleteWebhook>
type GetWebhookInfo = JsonRequest<GetWebhookInfo>
type GetMe = JsonRequest<GetMe>
type SendMessage = JsonRequest<SendMessage>
type ForwardMessage = JsonRequest<ForwardMessage>
type ForwardMessages = JsonRequest<ForwardMessages>
type SendPhoto = MultipartRequest<SendPhoto>
type SendAudio = MultipartRequest<SendAudio>
type SendDocument = MultipartRequest<SendDocument>
type SendVideo = MultipartRequest<SendVideo>
type SendAnimation = MultipartRequest<SendAnimation>
type SendVoice = MultipartRequest<SendVoice>
type SendVideoNote = MultipartRequest<SendVideoNote>
type SendMediaGroup = MultipartRequest<SendMediaGroup>
type SendLocation = JsonRequest<SendLocation>
type EditMessageLiveLocation = JsonRequest<EditMessageLiveLocation>
type EditMessageLiveLocationInline = JsonRequest<EditMessageLiveLocationInline>
type StopMessageLiveLocation = JsonRequest<StopMessageLiveLocation>
type StopMessageLiveLocationInline = JsonRequest<StopMessageLiveLocationInline>
type SendVenue = JsonRequest<SendVenue>
type SendContact = JsonRequest<SendContact>
type SendPoll = JsonRequest<SendPoll>
type SendDice = JsonRequest<SendDice>
type SendChatAction = JsonRequest<SendChatAction>
type SetMessageReaction = JsonRequest<SetMessageReaction>
type GetUserProfilePhotos = JsonRequest<GetUserProfilePhotos>
type GetFile = JsonRequest<GetFile>
type KickChatMember = JsonRequest<KickChatMember>
type BanChatMember = JsonRequest<BanChatMember>
type UnbanChatMember = JsonRequest<UnbanChatMember>
type RestrictChatMember = JsonRequest<RestrictChatMember>
type PromoteChatMember = JsonRequest<PromoteChatMember>
type SetChatAdministratorCustomTitle = JsonRequest<SetChatAdministratorCustomTitle>
type BanChatSenderChat = JsonRequest<BanChatSenderChat>
type UnbanChatSenderChat = JsonRequest<UnbanChatSenderChat>
type SetChatPermissions = JsonRequest<SetChatPermissions>
type ExportChatInviteLink = JsonRequest<ExportChatInviteLink>
type CreateChatInviteLink = JsonRequest<CreateChatInviteLink>
type EditChatInviteLink = JsonRequest<EditChatInviteLink>
type RevokeChatInviteLink = JsonRequest<RevokeChatInviteLink>
type ApproveChatJoinRequest = JsonRequest<ApproveChatJoinRequest>
type DeclineChatJoinRequest = JsonRequest<DeclineChatJoinRequest>
type SetChatPhoto = MultipartRequest<SetChatPhoto>
type DeleteChatPhoto = JsonRequest<DeleteChatPhoto>
type SetChatTitle = JsonRequest<SetChatTitle>
type SetChatDescription = JsonRequest<SetChatDescription>
type PinChatMessage = JsonRequest<PinChatMessage>
type UnpinChatMessage = JsonRequest<UnpinChatMessage>
type LeaveChat = JsonRequest<LeaveChat>
type GetChat = JsonRequest<GetChat>
type GetChatAdministrators = JsonRequest<GetChatAdministrators>
type GetChatMembersCount = JsonRequest<GetChatMembersCount>
type GetChatMemberCount = JsonRequest<GetChatMemberCount>
type GetChatMember = JsonRequest<GetChatMember>
type SetChatStickerSet = JsonRequest<SetChatStickerSet>
type DeleteChatStickerSet = JsonRequest<DeleteChatStickerSet>
type GetForumTopicIconStickers = JsonRequest<GetForumTopicIconStickers>
type CreateForumTopic = JsonRequest<CreateForumTopic>
type EditForumTopic = JsonRequest<EditForumTopic>
type CloseForumTopic = JsonRequest<CloseForumTopic>
type ReopenForumTopic = JsonRequest<ReopenForumTopic>
type DeleteForumTopic = JsonRequest<DeleteForumTopic>
type UnpinAllForumTopicMessages = JsonRequest<UnpinAllForumTopicMessages>
type EditGeneralForumTopic = JsonRequest<EditGeneralForumTopic>
type CloseGeneralForumTopic = JsonRequest<CloseGeneralForumTopic>
type ReopenGeneralForumTopic = JsonRequest<ReopenGeneralForumTopic>
type HideGeneralForumTopic = JsonRequest<HideGeneralForumTopic>
type UnhideGeneralForumTopic = JsonRequest<UnhideGeneralForumTopic>
type UnpinAllGeneralForumTopicMessages = JsonRequest<UnpinAllGeneralForumTopicMessages>
type AnswerCallbackQuery = JsonRequest<AnswerCallbackQuery>
type GetUserChatBoosts = JsonRequest<GetUserChatBoosts>
type SetMyCommands = JsonRequest<SetMyCommands>
type GetMyCommands = JsonRequest<GetMyCommands>
type SetMyName = JsonRequest<SetMyName>
type GetMyName = JsonRequest<GetMyName>
type SetMyDescription = JsonRequest<SetMyDescription>
type GetMyDescription = JsonRequest<GetMyDescription>
type SetMyShortDescription = JsonRequest<SetMyShortDescription>
type GetMyShortDescription = JsonRequest<GetMyShortDescription>
type SetChatMenuButton = JsonRequest<SetChatMenuButton>
type GetChatMenuButton = JsonRequest<GetChatMenuButton>
type SetMyDefaultAdministratorRights = JsonRequest<SetMyDefaultAdministratorRights>
type GetMyDefaultAdministratorRights = JsonRequest<GetMyDefaultAdministratorRights>
type DeleteMyCommands = JsonRequest<DeleteMyCommands>
type AnswerInlineQuery = JsonRequest<AnswerInlineQuery>
type AnswerWebAppQuery = JsonRequest<AnswerWebAppQuery>
type EditMessageText = JsonRequest<EditMessageText>
type EditMessageTextInline = JsonRequest<EditMessageTextInline>
type EditMessageCaption = JsonRequest<EditMessageCaption>
type EditMessageCaptionInline = JsonRequest<EditMessageCaptionInline>
type EditMessageMedia = MultipartRequest<EditMessageMedia>
type EditMessageMediaInline = MultipartRequest<EditMessageMediaInline>
type EditMessageReplyMarkup = JsonRequest<EditMessageReplyMarkup>
type EditMessageReplyMarkupInline = JsonRequest<EditMessageReplyMarkupInline>
type StopPoll = JsonRequest<StopPoll>
type DeleteMessage = JsonRequest<DeleteMessage>
type DeleteMessages = JsonRequest<DeleteMessages>
type SendSticker = MultipartRequest<SendSticker>
type GetStickerSet = JsonRequest<GetStickerSet>
type GetCustomEmojiStickers = JsonRequest<GetCustomEmojiStickers>
type UploadStickerFile = MultipartRequest<UploadStickerFile>
type CreateNewStickerSet = MultipartRequest<CreateNewStickerSet>
type AddStickerToSet = MultipartRequest<AddStickerToSet>
type SetStickerPositionInSet = JsonRequest<SetStickerPositionInSet>
type DeleteStickerFromSet = JsonRequest<DeleteStickerFromSet>
type SetStickerSetThumbnail = MultipartRequest<SetStickerSetThumbnail>
type SetCustomEmojiStickerSetThumbnail = JsonRequest<SetCustomEmojiStickerSetThumbnail>
type SetStickerSetTitle = JsonRequest<SetStickerSetTitle>
type DeleteStickerSet = JsonRequest<DeleteStickerSet>
type SetStickerEmojiList = JsonRequest<SetStickerEmojiList>
type SetStickerKeywords = JsonRequest<SetStickerKeywords>
type SetStickerMaskPosition = JsonRequest<SetStickerMaskPosition>
type SendInvoice = JsonRequest<SendInvoice>
type CreateInvoiceLink = JsonRequest<CreateInvoiceLink>
type AnswerShippingQuery = JsonRequest<AnswerShippingQuery>
type AnswerPreCheckoutQuery = JsonRequest<AnswerPreCheckoutQuery>
type SetPassportDataErrors = JsonRequest<SetPassportDataErrors>
type SendGame = JsonRequest<SendGame>
type SetGameScore = JsonRequest<SetGameScore>
type SetGameScoreInline = JsonRequest<SetGameScoreInline>
type GetGameHighScores = JsonRequest<GetGameHighScores>
type LogOut = JsonRequest<LogOut>
type Close = JsonRequest<Close>
type CopyMessage = JsonRequest<CopyMessage>
type CopyMessages = JsonRequest<CopyMessages>
type UnpinAllChatMessages = JsonRequest<UnpinAllChatMessages>
Source§fn get_updates(&self) -> Self::GetUpdates
fn get_updates(&self) -> Self::GetUpdates
GetUpdates
.Source§fn set_webhook(&self, url: Url) -> Self::SetWebhook
fn set_webhook(&self, url: Url) -> Self::SetWebhook
SetWebhook
.Source§fn delete_webhook(&self) -> Self::DeleteWebhook
fn delete_webhook(&self) -> Self::DeleteWebhook
DeleteWebhook
.Source§fn get_webhook_info(&self) -> Self::GetWebhookInfo
fn get_webhook_info(&self) -> Self::GetWebhookInfo
GetWebhookInfo
.Source§fn send_message<C, T>(&self, chat_id: C, text: T) -> Self::SendMessage
fn send_message<C, T>(&self, chat_id: C, text: T) -> Self::SendMessage
SendMessage
.Source§fn forward_message<C, F>(
&self,
chat_id: C,
from_chat_id: F,
message_id: MessageId,
) -> Self::ForwardMessage
fn forward_message<C, F>( &self, chat_id: C, from_chat_id: F, message_id: MessageId, ) -> Self::ForwardMessage
ForwardMessage
.Source§fn forward_messages<C, F, M>(
&self,
chat_id: C,
from_chat_id: F,
message_ids: M,
) -> Self::ForwardMessages
fn forward_messages<C, F, M>( &self, chat_id: C, from_chat_id: F, message_ids: M, ) -> Self::ForwardMessages
ForwardMessages
.Source§fn send_photo<C>(&self, chat_id: C, photo: InputFile) -> Self::SendPhoto
fn send_photo<C>(&self, chat_id: C, photo: InputFile) -> Self::SendPhoto
SendPhoto
.Source§fn send_audio<C>(&self, chat_id: C, audio: InputFile) -> Self::SendAudio
fn send_audio<C>(&self, chat_id: C, audio: InputFile) -> Self::SendAudio
SendAudio
.Source§fn send_document<C>(
&self,
chat_id: C,
document: InputFile,
) -> Self::SendDocument
fn send_document<C>( &self, chat_id: C, document: InputFile, ) -> Self::SendDocument
SendDocument
.Source§fn send_video<C>(&self, chat_id: C, video: InputFile) -> Self::SendVideo
fn send_video<C>(&self, chat_id: C, video: InputFile) -> Self::SendVideo
SendVideo
.Source§fn send_animation<C>(
&self,
chat_id: C,
animation: InputFile,
) -> Self::SendAnimation
fn send_animation<C>( &self, chat_id: C, animation: InputFile, ) -> Self::SendAnimation
SendAnimation
.Source§fn send_voice<C>(&self, chat_id: C, voice: InputFile) -> Self::SendVoice
fn send_voice<C>(&self, chat_id: C, voice: InputFile) -> Self::SendVoice
SendVoice
.Source§fn send_video_note<C>(
&self,
chat_id: C,
video_note: InputFile,
) -> Self::SendVideoNote
fn send_video_note<C>( &self, chat_id: C, video_note: InputFile, ) -> Self::SendVideoNote
SendVideoNote
.Source§fn send_media_group<C, M>(&self, chat_id: C, media: M) -> Self::SendMediaGroup
fn send_media_group<C, M>(&self, chat_id: C, media: M) -> Self::SendMediaGroup
SendMediaGroup
.Source§fn send_location<C>(
&self,
chat_id: C,
latitude: f64,
longitude: f64,
) -> Self::SendLocation
fn send_location<C>( &self, chat_id: C, latitude: f64, longitude: f64, ) -> Self::SendLocation
SendLocation
.Source§fn edit_message_live_location<C>(
&self,
chat_id: C,
message_id: MessageId,
latitude: f64,
longitude: f64,
) -> Self::EditMessageLiveLocation
fn edit_message_live_location<C>( &self, chat_id: C, message_id: MessageId, latitude: f64, longitude: f64, ) -> Self::EditMessageLiveLocation
EditMessageLiveLocation
.Source§fn edit_message_live_location_inline<I>(
&self,
inline_message_id: I,
latitude: f64,
longitude: f64,
) -> Self::EditMessageLiveLocationInline
fn edit_message_live_location_inline<I>( &self, inline_message_id: I, latitude: f64, longitude: f64, ) -> Self::EditMessageLiveLocationInline
EditMessageLiveLocationInline
.Source§fn stop_message_live_location<C>(
&self,
chat_id: C,
message_id: MessageId,
) -> Self::StopMessageLiveLocation
fn stop_message_live_location<C>( &self, chat_id: C, message_id: MessageId, ) -> Self::StopMessageLiveLocation
StopMessageLiveLocation
.Source§fn stop_message_live_location_inline<I>(
&self,
inline_message_id: I,
) -> Self::StopMessageLiveLocationInline
fn stop_message_live_location_inline<I>( &self, inline_message_id: I, ) -> Self::StopMessageLiveLocationInline
StopMessageLiveLocationInline
.Source§fn send_venue<C, T, A>(
&self,
chat_id: C,
latitude: f64,
longitude: f64,
title: T,
address: A,
) -> Self::SendVenue
fn send_venue<C, T, A>( &self, chat_id: C, latitude: f64, longitude: f64, title: T, address: A, ) -> Self::SendVenue
SendVenue
.Source§fn send_contact<C, P, F>(
&self,
chat_id: C,
phone_number: P,
first_name: F,
) -> Self::SendContact
fn send_contact<C, P, F>( &self, chat_id: C, phone_number: P, first_name: F, ) -> Self::SendContact
SendContact
.Source§fn send_poll<C, Q, O>(
&self,
chat_id: C,
question: Q,
options: O,
) -> Self::SendPoll
fn send_poll<C, Q, O>( &self, chat_id: C, question: Q, options: O, ) -> Self::SendPoll
SendPoll
.Source§fn send_chat_action<C>(
&self,
chat_id: C,
action: ChatAction,
) -> Self::SendChatAction
fn send_chat_action<C>( &self, chat_id: C, action: ChatAction, ) -> Self::SendChatAction
SendChatAction
.Source§fn set_message_reaction<C>(
&self,
chat_id: C,
message_id: MessageId,
) -> Self::SetMessageReaction
fn set_message_reaction<C>( &self, chat_id: C, message_id: MessageId, ) -> Self::SetMessageReaction
SetMessageReaction
.Source§fn get_user_profile_photos(&self, user_id: UserId) -> Self::GetUserProfilePhotos
fn get_user_profile_photos(&self, user_id: UserId) -> Self::GetUserProfilePhotos
GetUserProfilePhotos
.Source§fn kick_chat_member<C>(
&self,
chat_id: C,
user_id: UserId,
) -> Self::KickChatMember
fn kick_chat_member<C>( &self, chat_id: C, user_id: UserId, ) -> Self::KickChatMember
KickChatMember
.Source§fn ban_chat_member<C>(&self, chat_id: C, user_id: UserId) -> Self::BanChatMember
fn ban_chat_member<C>(&self, chat_id: C, user_id: UserId) -> Self::BanChatMember
BanChatMember
.Source§fn unban_chat_member<C>(
&self,
chat_id: C,
user_id: UserId,
) -> Self::UnbanChatMember
fn unban_chat_member<C>( &self, chat_id: C, user_id: UserId, ) -> Self::UnbanChatMember
UnbanChatMember
.Source§fn restrict_chat_member<C>(
&self,
chat_id: C,
user_id: UserId,
permissions: ChatPermissions,
) -> Self::RestrictChatMember
fn restrict_chat_member<C>( &self, chat_id: C, user_id: UserId, permissions: ChatPermissions, ) -> Self::RestrictChatMember
RestrictChatMember
.Source§fn promote_chat_member<C>(
&self,
chat_id: C,
user_id: UserId,
) -> Self::PromoteChatMember
fn promote_chat_member<C>( &self, chat_id: C, user_id: UserId, ) -> Self::PromoteChatMember
PromoteChatMember
.Source§fn set_chat_administrator_custom_title<Ch, Cu>(
&self,
chat_id: Ch,
user_id: UserId,
custom_title: Cu,
) -> Self::SetChatAdministratorCustomTitle
fn set_chat_administrator_custom_title<Ch, Cu>( &self, chat_id: Ch, user_id: UserId, custom_title: Cu, ) -> Self::SetChatAdministratorCustomTitle
SetChatAdministratorCustomTitle
.Source§fn ban_chat_sender_chat<C, S>(
&self,
chat_id: C,
sender_chat_id: S,
) -> Self::BanChatSenderChat
fn ban_chat_sender_chat<C, S>( &self, chat_id: C, sender_chat_id: S, ) -> Self::BanChatSenderChat
BanChatSenderChat
.Source§fn unban_chat_sender_chat<C, S>(
&self,
chat_id: C,
sender_chat_id: S,
) -> Self::UnbanChatSenderChat
fn unban_chat_sender_chat<C, S>( &self, chat_id: C, sender_chat_id: S, ) -> Self::UnbanChatSenderChat
UnbanChatSenderChat
.Source§fn set_chat_permissions<C>(
&self,
chat_id: C,
permissions: ChatPermissions,
) -> Self::SetChatPermissions
fn set_chat_permissions<C>( &self, chat_id: C, permissions: ChatPermissions, ) -> Self::SetChatPermissions
SetChatPermissions
.Source§fn export_chat_invite_link<C>(&self, chat_id: C) -> Self::ExportChatInviteLink
fn export_chat_invite_link<C>(&self, chat_id: C) -> Self::ExportChatInviteLink
ExportChatInviteLink
.Source§fn create_chat_invite_link<C>(&self, chat_id: C) -> Self::CreateChatInviteLink
fn create_chat_invite_link<C>(&self, chat_id: C) -> Self::CreateChatInviteLink
CreateChatInviteLink
.Source§fn edit_chat_invite_link<C, I>(
&self,
chat_id: C,
invite_link: I,
) -> Self::EditChatInviteLink
fn edit_chat_invite_link<C, I>( &self, chat_id: C, invite_link: I, ) -> Self::EditChatInviteLink
EditChatInviteLink
.Source§fn revoke_chat_invite_link<C, I>(
&self,
chat_id: C,
invite_link: I,
) -> Self::RevokeChatInviteLink
fn revoke_chat_invite_link<C, I>( &self, chat_id: C, invite_link: I, ) -> Self::RevokeChatInviteLink
RevokeChatInviteLink
.Source§fn approve_chat_join_request<C>(
&self,
chat_id: C,
user_id: UserId,
) -> Self::ApproveChatJoinRequest
fn approve_chat_join_request<C>( &self, chat_id: C, user_id: UserId, ) -> Self::ApproveChatJoinRequest
ApproveChatJoinRequest
.Source§fn decline_chat_join_request<C>(
&self,
chat_id: C,
user_id: UserId,
) -> Self::DeclineChatJoinRequest
fn decline_chat_join_request<C>( &self, chat_id: C, user_id: UserId, ) -> Self::DeclineChatJoinRequest
DeclineChatJoinRequest
.Source§fn set_chat_photo<C>(&self, chat_id: C, photo: InputFile) -> Self::SetChatPhoto
fn set_chat_photo<C>(&self, chat_id: C, photo: InputFile) -> Self::SetChatPhoto
SetChatPhoto
.Source§fn delete_chat_photo<C>(&self, chat_id: C) -> Self::DeleteChatPhoto
fn delete_chat_photo<C>(&self, chat_id: C) -> Self::DeleteChatPhoto
DeleteChatPhoto
.Source§fn set_chat_title<C, T>(&self, chat_id: C, title: T) -> Self::SetChatTitle
fn set_chat_title<C, T>(&self, chat_id: C, title: T) -> Self::SetChatTitle
SetChatTitle
.Source§fn set_chat_description<C>(&self, chat_id: C) -> Self::SetChatDescription
fn set_chat_description<C>(&self, chat_id: C) -> Self::SetChatDescription
SetChatDescription
.Source§fn pin_chat_message<C>(
&self,
chat_id: C,
message_id: MessageId,
) -> Self::PinChatMessage
fn pin_chat_message<C>( &self, chat_id: C, message_id: MessageId, ) -> Self::PinChatMessage
PinChatMessage
.Source§fn unpin_chat_message<C>(&self, chat_id: C) -> Self::UnpinChatMessage
fn unpin_chat_message<C>(&self, chat_id: C) -> Self::UnpinChatMessage
UnpinChatMessage
.Source§fn leave_chat<C>(&self, chat_id: C) -> Self::LeaveChat
fn leave_chat<C>(&self, chat_id: C) -> Self::LeaveChat
LeaveChat
.Source§fn get_chat_administrators<C>(&self, chat_id: C) -> Self::GetChatAdministrators
fn get_chat_administrators<C>(&self, chat_id: C) -> Self::GetChatAdministrators
GetChatAdministrators
.Source§fn get_chat_members_count<C>(&self, chat_id: C) -> Self::GetChatMembersCount
fn get_chat_members_count<C>(&self, chat_id: C) -> Self::GetChatMembersCount
GetChatMembersCount
.Source§fn get_chat_member_count<C>(&self, chat_id: C) -> Self::GetChatMemberCount
fn get_chat_member_count<C>(&self, chat_id: C) -> Self::GetChatMemberCount
GetChatMemberCount
.Source§fn get_chat_member<C>(&self, chat_id: C, user_id: UserId) -> Self::GetChatMember
fn get_chat_member<C>(&self, chat_id: C, user_id: UserId) -> Self::GetChatMember
GetChatMember
.Source§fn set_chat_sticker_set<C, S>(
&self,
chat_id: C,
sticker_set_name: S,
) -> Self::SetChatStickerSet
fn set_chat_sticker_set<C, S>( &self, chat_id: C, sticker_set_name: S, ) -> Self::SetChatStickerSet
SetChatStickerSet
.Source§fn delete_chat_sticker_set<C>(&self, chat_id: C) -> Self::DeleteChatStickerSet
fn delete_chat_sticker_set<C>(&self, chat_id: C) -> Self::DeleteChatStickerSet
DeleteChatStickerSet
.Source§fn get_forum_topic_icon_stickers(&self) -> Self::GetForumTopicIconStickers
fn get_forum_topic_icon_stickers(&self) -> Self::GetForumTopicIconStickers
GetForumTopicIconStickers
.Source§fn create_forum_topic<C, N, I>(
&self,
chat_id: C,
name: N,
icon_color: u32,
icon_custom_emoji_id: I,
) -> Self::CreateForumTopic
fn create_forum_topic<C, N, I>( &self, chat_id: C, name: N, icon_color: u32, icon_custom_emoji_id: I, ) -> Self::CreateForumTopic
CreateForumTopic
.Source§fn edit_forum_topic<C>(
&self,
chat_id: C,
message_thread_id: ThreadId,
) -> Self::EditForumTopic
fn edit_forum_topic<C>( &self, chat_id: C, message_thread_id: ThreadId, ) -> Self::EditForumTopic
EditForumTopic
.Source§fn close_forum_topic<C>(
&self,
chat_id: C,
message_thread_id: ThreadId,
) -> Self::CloseForumTopic
fn close_forum_topic<C>( &self, chat_id: C, message_thread_id: ThreadId, ) -> Self::CloseForumTopic
CloseForumTopic
.Source§fn reopen_forum_topic<C>(
&self,
chat_id: C,
message_thread_id: ThreadId,
) -> Self::ReopenForumTopic
fn reopen_forum_topic<C>( &self, chat_id: C, message_thread_id: ThreadId, ) -> Self::ReopenForumTopic
ReopenForumTopic
.Source§fn delete_forum_topic<C>(
&self,
chat_id: C,
message_thread_id: ThreadId,
) -> Self::DeleteForumTopic
fn delete_forum_topic<C>( &self, chat_id: C, message_thread_id: ThreadId, ) -> Self::DeleteForumTopic
DeleteForumTopic
.Source§fn unpin_all_forum_topic_messages<C>(
&self,
chat_id: C,
message_thread_id: ThreadId,
) -> Self::UnpinAllForumTopicMessages
fn unpin_all_forum_topic_messages<C>( &self, chat_id: C, message_thread_id: ThreadId, ) -> Self::UnpinAllForumTopicMessages
UnpinAllForumTopicMessages
.Source§fn edit_general_forum_topic<C, N>(
&self,
chat_id: C,
name: N,
) -> Self::EditGeneralForumTopic
fn edit_general_forum_topic<C, N>( &self, chat_id: C, name: N, ) -> Self::EditGeneralForumTopic
EditGeneralForumTopic
.Source§fn close_general_forum_topic<C>(
&self,
chat_id: C,
) -> Self::CloseGeneralForumTopic
fn close_general_forum_topic<C>( &self, chat_id: C, ) -> Self::CloseGeneralForumTopic
CloseGeneralForumTopic
.Source§fn reopen_general_forum_topic<C>(
&self,
chat_id: C,
) -> Self::ReopenGeneralForumTopic
fn reopen_general_forum_topic<C>( &self, chat_id: C, ) -> Self::ReopenGeneralForumTopic
ReopenGeneralForumTopic
.Source§fn hide_general_forum_topic<C>(&self, chat_id: C) -> Self::HideGeneralForumTopic
fn hide_general_forum_topic<C>(&self, chat_id: C) -> Self::HideGeneralForumTopic
HideGeneralForumTopic
.Source§fn unhide_general_forum_topic<C>(
&self,
chat_id: C,
) -> Self::UnhideGeneralForumTopic
fn unhide_general_forum_topic<C>( &self, chat_id: C, ) -> Self::UnhideGeneralForumTopic
UnhideGeneralForumTopic
.Source§fn unpin_all_general_forum_topic_messages<C>(
&self,
chat_id: C,
) -> Self::UnpinAllGeneralForumTopicMessages
fn unpin_all_general_forum_topic_messages<C>( &self, chat_id: C, ) -> Self::UnpinAllGeneralForumTopicMessages
UnpinAllGeneralForumTopicMessages
.Source§fn answer_callback_query<C>(
&self,
callback_query_id: C,
) -> Self::AnswerCallbackQuery
fn answer_callback_query<C>( &self, callback_query_id: C, ) -> Self::AnswerCallbackQuery
AnswerCallbackQuery
.Source§fn get_user_chat_boosts<C>(
&self,
chat_id: C,
user_id: UserId,
) -> Self::GetUserChatBoosts
fn get_user_chat_boosts<C>( &self, chat_id: C, user_id: UserId, ) -> Self::GetUserChatBoosts
GetUserChatBoosts
.Source§fn set_my_commands<C>(&self, commands: C) -> Self::SetMyCommandswhere
C: IntoIterator<Item = BotCommand>,
fn set_my_commands<C>(&self, commands: C) -> Self::SetMyCommandswhere
C: IntoIterator<Item = BotCommand>,
SetMyCommands
.Source§fn get_my_commands(&self) -> Self::GetMyCommands
fn get_my_commands(&self) -> Self::GetMyCommands
GetMyCommands
.Source§fn set_my_name(&self) -> Self::SetMyName
fn set_my_name(&self) -> Self::SetMyName
SetMyName
.Source§fn get_my_name(&self) -> Self::GetMyName
fn get_my_name(&self) -> Self::GetMyName
GetMyName
.Source§fn set_my_description(&self) -> Self::SetMyDescription
fn set_my_description(&self) -> Self::SetMyDescription
SetMyDescription
.Source§fn get_my_description(&self) -> Self::GetMyDescription
fn get_my_description(&self) -> Self::GetMyDescription
GetMyDescription
.Source§fn set_my_short_description(&self) -> Self::SetMyShortDescription
fn set_my_short_description(&self) -> Self::SetMyShortDescription
SetMyShortDescription
.Source§fn get_my_short_description(&self) -> Self::GetMyShortDescription
fn get_my_short_description(&self) -> Self::GetMyShortDescription
GetMyShortDescription
.SetChatMenuButton
.GetChatMenuButton
.Source§fn set_my_default_administrator_rights(
&self,
) -> Self::SetMyDefaultAdministratorRights
fn set_my_default_administrator_rights( &self, ) -> Self::SetMyDefaultAdministratorRights
SetMyDefaultAdministratorRights
.Source§fn get_my_default_administrator_rights(
&self,
) -> Self::GetMyDefaultAdministratorRights
fn get_my_default_administrator_rights( &self, ) -> Self::GetMyDefaultAdministratorRights
GetMyDefaultAdministratorRights
.Source§fn delete_my_commands(&self) -> Self::DeleteMyCommands
fn delete_my_commands(&self) -> Self::DeleteMyCommands
DeleteMyCommands
.Source§fn answer_inline_query<I, R>(
&self,
inline_query_id: I,
results: R,
) -> Self::AnswerInlineQuery
fn answer_inline_query<I, R>( &self, inline_query_id: I, results: R, ) -> Self::AnswerInlineQuery
AnswerInlineQuery
.Source§fn answer_web_app_query<W>(
&self,
web_app_query_id: W,
result: InlineQueryResult,
) -> Self::AnswerWebAppQuery
fn answer_web_app_query<W>( &self, web_app_query_id: W, result: InlineQueryResult, ) -> Self::AnswerWebAppQuery
AnswerWebAppQuery
.Source§fn edit_message_text<C, T>(
&self,
chat_id: C,
message_id: MessageId,
text: T,
) -> Self::EditMessageText
fn edit_message_text<C, T>( &self, chat_id: C, message_id: MessageId, text: T, ) -> Self::EditMessageText
EditMessageText
.Source§fn edit_message_text_inline<I, T>(
&self,
inline_message_id: I,
text: T,
) -> Self::EditMessageTextInline
fn edit_message_text_inline<I, T>( &self, inline_message_id: I, text: T, ) -> Self::EditMessageTextInline
EditMessageTextInline
.Source§fn edit_message_caption<C>(
&self,
chat_id: C,
message_id: MessageId,
) -> Self::EditMessageCaption
fn edit_message_caption<C>( &self, chat_id: C, message_id: MessageId, ) -> Self::EditMessageCaption
EditMessageCaption
.Source§fn edit_message_caption_inline<I>(
&self,
inline_message_id: I,
) -> Self::EditMessageCaptionInline
fn edit_message_caption_inline<I>( &self, inline_message_id: I, ) -> Self::EditMessageCaptionInline
EditMessageCaptionInline
.Source§fn edit_message_media<C>(
&self,
chat_id: C,
message_id: MessageId,
media: InputMedia,
) -> Self::EditMessageMedia
fn edit_message_media<C>( &self, chat_id: C, message_id: MessageId, media: InputMedia, ) -> Self::EditMessageMedia
EditMessageMedia
.Source§fn edit_message_media_inline<I>(
&self,
inline_message_id: I,
media: InputMedia,
) -> Self::EditMessageMediaInline
fn edit_message_media_inline<I>( &self, inline_message_id: I, media: InputMedia, ) -> Self::EditMessageMediaInline
EditMessageMediaInline
.Source§fn edit_message_reply_markup<C>(
&self,
chat_id: C,
message_id: MessageId,
) -> Self::EditMessageReplyMarkup
fn edit_message_reply_markup<C>( &self, chat_id: C, message_id: MessageId, ) -> Self::EditMessageReplyMarkup
EditMessageReplyMarkup
.Source§fn edit_message_reply_markup_inline<I>(
&self,
inline_message_id: I,
) -> Self::EditMessageReplyMarkupInline
fn edit_message_reply_markup_inline<I>( &self, inline_message_id: I, ) -> Self::EditMessageReplyMarkupInline
EditMessageReplyMarkupInline
.Source§fn stop_poll<C>(&self, chat_id: C, message_id: MessageId) -> Self::StopPoll
fn stop_poll<C>(&self, chat_id: C, message_id: MessageId) -> Self::StopPoll
StopPoll
.Source§fn delete_message<C>(
&self,
chat_id: C,
message_id: MessageId,
) -> Self::DeleteMessage
fn delete_message<C>( &self, chat_id: C, message_id: MessageId, ) -> Self::DeleteMessage
DeleteMessage
.Source§fn delete_messages<C, M>(
&self,
chat_id: C,
message_ids: M,
) -> Self::DeleteMessages
fn delete_messages<C, M>( &self, chat_id: C, message_ids: M, ) -> Self::DeleteMessages
DeleteMessages
.Source§fn send_sticker<C>(&self, chat_id: C, sticker: InputFile) -> Self::SendSticker
fn send_sticker<C>(&self, chat_id: C, sticker: InputFile) -> Self::SendSticker
SendSticker
.Source§fn get_sticker_set<N>(&self, name: N) -> Self::GetStickerSet
fn get_sticker_set<N>(&self, name: N) -> Self::GetStickerSet
GetStickerSet
.Source§fn get_custom_emoji_stickers<C>(
&self,
custom_emoji_ids: C,
) -> Self::GetCustomEmojiStickerswhere
C: IntoIterator<Item = String>,
fn get_custom_emoji_stickers<C>(
&self,
custom_emoji_ids: C,
) -> Self::GetCustomEmojiStickerswhere
C: IntoIterator<Item = String>,
GetCustomEmojiStickers
.Source§fn upload_sticker_file(
&self,
user_id: UserId,
sticker: InputFile,
sticker_format: StickerFormat,
) -> Self::UploadStickerFile
fn upload_sticker_file( &self, user_id: UserId, sticker: InputFile, sticker_format: StickerFormat, ) -> Self::UploadStickerFile
UploadStickerFile
.Source§fn create_new_sticker_set<N, T, S>(
&self,
user_id: UserId,
name: N,
title: T,
stickers: S,
sticker_format: StickerFormat,
) -> Self::CreateNewStickerSet
fn create_new_sticker_set<N, T, S>( &self, user_id: UserId, name: N, title: T, stickers: S, sticker_format: StickerFormat, ) -> Self::CreateNewStickerSet
CreateNewStickerSet
.Source§fn add_sticker_to_set<N>(
&self,
user_id: UserId,
name: N,
sticker: InputSticker,
) -> Self::AddStickerToSet
fn add_sticker_to_set<N>( &self, user_id: UserId, name: N, sticker: InputSticker, ) -> Self::AddStickerToSet
AddStickerToSet
.Source§fn set_sticker_position_in_set<S>(
&self,
sticker: S,
position: u32,
) -> Self::SetStickerPositionInSet
fn set_sticker_position_in_set<S>( &self, sticker: S, position: u32, ) -> Self::SetStickerPositionInSet
SetStickerPositionInSet
.Source§fn delete_sticker_from_set<S>(&self, sticker: S) -> Self::DeleteStickerFromSet
fn delete_sticker_from_set<S>(&self, sticker: S) -> Self::DeleteStickerFromSet
DeleteStickerFromSet
.Source§fn set_sticker_set_thumbnail<N>(
&self,
name: N,
user_id: UserId,
) -> Self::SetStickerSetThumbnail
fn set_sticker_set_thumbnail<N>( &self, name: N, user_id: UserId, ) -> Self::SetStickerSetThumbnail
SetStickerSetThumbnail
.Source§fn set_custom_emoji_sticker_set_thumbnail<N>(
&self,
name: N,
) -> Self::SetCustomEmojiStickerSetThumbnail
fn set_custom_emoji_sticker_set_thumbnail<N>( &self, name: N, ) -> Self::SetCustomEmojiStickerSetThumbnail
SetCustomEmojiStickerSetThumbnail
.Source§fn set_sticker_set_title<N, T>(
&self,
name: N,
title: T,
) -> Self::SetStickerSetTitle
fn set_sticker_set_title<N, T>( &self, name: N, title: T, ) -> Self::SetStickerSetTitle
SetStickerSetTitle
.Source§fn delete_sticker_set<N>(&self, name: N) -> Self::DeleteStickerSet
fn delete_sticker_set<N>(&self, name: N) -> Self::DeleteStickerSet
DeleteStickerSet
.Source§fn set_sticker_emoji_list<S, E>(
&self,
sticker: S,
emoji_list: E,
) -> Self::SetStickerEmojiList
fn set_sticker_emoji_list<S, E>( &self, sticker: S, emoji_list: E, ) -> Self::SetStickerEmojiList
SetStickerEmojiList
.Source§fn set_sticker_keywords<S>(&self, sticker: S) -> Self::SetStickerKeywords
fn set_sticker_keywords<S>(&self, sticker: S) -> Self::SetStickerKeywords
SetStickerKeywords
.Source§fn set_sticker_mask_position<S>(
&self,
sticker: S,
) -> Self::SetStickerMaskPosition
fn set_sticker_mask_position<S>( &self, sticker: S, ) -> Self::SetStickerMaskPosition
SetStickerMaskPosition
.Source§fn send_invoice<Ch, T, D, Pa, P, C, Pri>(
&self,
chat_id: Ch,
title: T,
description: D,
payload: Pa,
provider_token: P,
currency: C,
prices: Pri,
) -> Self::SendInvoice
fn send_invoice<Ch, T, D, Pa, P, C, Pri>( &self, chat_id: Ch, title: T, description: D, payload: Pa, provider_token: P, currency: C, prices: Pri, ) -> Self::SendInvoice
SendInvoice
.Source§fn create_invoice_link<T, D, Pa, P, C, Pri>(
&self,
title: T,
description: D,
payload: Pa,
provider_token: P,
currency: C,
prices: Pri,
) -> Self::CreateInvoiceLink
fn create_invoice_link<T, D, Pa, P, C, Pri>( &self, title: T, description: D, payload: Pa, provider_token: P, currency: C, prices: Pri, ) -> Self::CreateInvoiceLink
CreateInvoiceLink
.Source§fn answer_shipping_query<S>(
&self,
shipping_query_id: S,
ok: bool,
) -> Self::AnswerShippingQuery
fn answer_shipping_query<S>( &self, shipping_query_id: S, ok: bool, ) -> Self::AnswerShippingQuery
AnswerShippingQuery
.Source§fn answer_pre_checkout_query<P>(
&self,
pre_checkout_query_id: P,
ok: bool,
) -> Self::AnswerPreCheckoutQuery
fn answer_pre_checkout_query<P>( &self, pre_checkout_query_id: P, ok: bool, ) -> Self::AnswerPreCheckoutQuery
AnswerPreCheckoutQuery
.Source§fn set_passport_data_errors<E>(
&self,
user_id: UserId,
errors: E,
) -> Self::SetPassportDataErrorswhere
E: IntoIterator<Item = PassportElementError>,
fn set_passport_data_errors<E>(
&self,
user_id: UserId,
errors: E,
) -> Self::SetPassportDataErrorswhere
E: IntoIterator<Item = PassportElementError>,
SetPassportDataErrors
.Source§fn send_game<C, G>(&self, chat_id: C, game_short_name: G) -> Self::SendGame
fn send_game<C, G>(&self, chat_id: C, game_short_name: G) -> Self::SendGame
SendGame
.Source§fn set_game_score(
&self,
user_id: UserId,
score: u64,
chat_id: u32,
message_id: MessageId,
) -> Self::SetGameScore
fn set_game_score( &self, user_id: UserId, score: u64, chat_id: u32, message_id: MessageId, ) -> Self::SetGameScore
SetGameScore
.Source§fn set_game_score_inline<I>(
&self,
user_id: UserId,
score: u64,
inline_message_id: I,
) -> Self::SetGameScoreInline
fn set_game_score_inline<I>( &self, user_id: UserId, score: u64, inline_message_id: I, ) -> Self::SetGameScoreInline
SetGameScoreInline
.Source§fn get_game_high_scores<T>(
&self,
user_id: UserId,
target: T,
) -> Self::GetGameHighScoreswhere
T: Into<TargetMessage>,
fn get_game_high_scores<T>(
&self,
user_id: UserId,
target: T,
) -> Self::GetGameHighScoreswhere
T: Into<TargetMessage>,
GetGameHighScores
.Source§fn copy_message<C, F>(
&self,
chat_id: C,
from_chat_id: F,
message_id: MessageId,
) -> Self::CopyMessage
fn copy_message<C, F>( &self, chat_id: C, from_chat_id: F, message_id: MessageId, ) -> Self::CopyMessage
CopyMessage
.Source§fn copy_messages<C, F, M>(
&self,
chat_id: C,
from_chat_id: F,
message_ids: M,
) -> Self::CopyMessages
fn copy_messages<C, F, M>( &self, chat_id: C, from_chat_id: F, message_ids: M, ) -> Self::CopyMessages
CopyMessages
.Source§fn unpin_all_chat_messages<C>(&self, chat_id: C) -> Self::UnpinAllChatMessages
fn unpin_all_chat_messages<C>(&self, chat_id: C) -> Self::UnpinAllChatMessages
UnpinAllChatMessages
.Auto Trait Implementations§
impl Freeze for Bot
impl !RefUnwindSafe for Bot
impl Send for Bot
impl Sync for Bot
impl Unpin for Bot
impl !UnwindSafe for Bot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> RequesterExt for Twhere
T: Requester,
impl<T> RequesterExt for Twhere
T: Requester,
Source§fn cache_me(self) -> CacheMe<Self> ⓘwhere
Self: Sized,
fn cache_me(self) -> CacheMe<Self> ⓘwhere
Self: Sized,
cache_me
only.get_me
caching ability, see CacheMe
for more.Source§fn erase<'a>(self) -> ErasedRequester<'a, Self::Err> ⓘwhere
Self: 'a + Sized,
fn erase<'a>(self) -> ErasedRequester<'a, Self::Err> ⓘwhere
Self: 'a + Sized,
erased
only.Source§fn trace(self, settings: Settings) -> Trace<Self> ⓘwhere
Self: Sized,
fn trace(self, settings: Settings) -> Trace<Self> ⓘwhere
Self: Sized,
trace_adaptor
only.Trace
for more.Source§fn throttle(self, limits: Limits) -> Throttle<Self> ⓘ
fn throttle(self, limits: Limits) -> Throttle<Self> ⓘ
throttle
only.