Struct teloxide::Bot [−][src]
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().send().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
impl Bot
[src]
Constructors
pub fn new<S>(token: S) -> Bot where
S: Into<String>,
[src]
S: Into<String>,
Creates a new Bot
with the specified token and the default
http-client.
Panics
If it cannot create reqwest::Client
.
pub fn with_client<S>(token: S, client: Client) -> Bot where
S: Into<String>,
[src]
S: Into<String>,
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.
pub fn from_env() -> Bot
[src]
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
.
pub fn from_env_with_client(client: Client) -> Bot
[src]
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.
pub fn set_api_url(self, url: Url) -> Bot
[src]
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().send().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/");
impl Bot
[src]
Getters
pub fn token(&self) -> &str
[src]
Returns currently used token.
pub fn client(&self) -> &Client
[src]
Returns currently used http-client.
pub fn api_url(&self) -> Url
[src]
Returns currently used token API url.
Trait Implementations
impl Clone for Bot
[src]
impl Debug for Bot
[src]
impl<'w> Download<'w> for Bot
[src]
type Err = DownloadError
An error returned from download_file
.
type Fut = Pin<Box<dyn Future<Output = Result<(), <Bot as Download<'w>>::Err>> + 'w + Send, Global>>
A future returned from download_file
.
pub fn download_file(
&self,
path: &str,
destination: &'w mut (dyn AsyncWrite + 'w + Send + Unpin)
) -> <Bot as Download<'w>>::Fut
[src]
&self,
path: &str,
destination: &'w mut (dyn AsyncWrite + 'w + Send + Unpin)
) -> <Bot as Download<'w>>::Fut
type StreamErr = Error
An error returned from
download_file_stream
. Read more
type Stream = Pin<Box<dyn Stream<Item = Result<Bytes, <Bot as Download<'w>>::StreamErr>> + 'static + Send, Global>>
A stream returned from download_file_stream
. Read more
pub fn download_file_stream(&self, path: &str) -> <Bot as Download<'w>>::Stream
[src]
impl Requester for Bot
[src]
type Err = RequestError
Error type returned by all requests.
type GetUpdates = JsonRequest<GetUpdates>
pub fn get_updates(&self) -> <Bot as Requester>::GetUpdates
[src]
type SetWebhook = JsonRequest<SetWebhook>
pub fn set_webhook<U>(&self, url: U) -> <Bot as Requester>::SetWebhook where
U: Into<String>,
[src]
U: Into<String>,
type DeleteWebhook = JsonRequest<DeleteWebhook>
pub fn delete_webhook(&self) -> <Bot as Requester>::DeleteWebhook
[src]
type GetWebhookInfo = JsonRequest<GetWebhookInfo>
pub fn get_webhook_info(&self) -> <Bot as Requester>::GetWebhookInfo
[src]
type GetMe = JsonRequest<GetMe>
pub fn get_me(&self) -> <Bot as Requester>::GetMe
[src]
type SendMessage = JsonRequest<SendMessage>
pub fn send_message<C, T>(
&self,
chat_id: C,
text: T
) -> <Bot as Requester>::SendMessage where
C: Into<ChatId>,
T: Into<String>,
[src]
&self,
chat_id: C,
text: T
) -> <Bot as Requester>::SendMessage where
C: Into<ChatId>,
T: Into<String>,
type ForwardMessage = JsonRequest<ForwardMessage>
pub fn forward_message<C, F>(
&self,
chat_id: C,
from_chat_id: F,
message_id: i32
) -> <Bot as Requester>::ForwardMessage where
C: Into<ChatId>,
F: Into<ChatId>,
[src]
&self,
chat_id: C,
from_chat_id: F,
message_id: i32
) -> <Bot as Requester>::ForwardMessage where
C: Into<ChatId>,
F: Into<ChatId>,
type SendPhoto = MultipartRequest<SendPhoto>
pub fn send_photo<C>(
&self,
chat_id: C,
photo: InputFile
) -> <Bot as Requester>::SendPhoto where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
photo: InputFile
) -> <Bot as Requester>::SendPhoto where
C: Into<ChatId>,
type SendAudio = MultipartRequest<SendAudio>
pub fn send_audio<C>(
&self,
chat_id: C,
audio: InputFile
) -> <Bot as Requester>::SendAudio where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
audio: InputFile
) -> <Bot as Requester>::SendAudio where
C: Into<ChatId>,
type SendDocument = MultipartRequest<SendDocument>
pub fn send_document<C>(
&self,
chat_id: C,
document: InputFile
) -> <Bot as Requester>::SendDocument where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
document: InputFile
) -> <Bot as Requester>::SendDocument where
C: Into<ChatId>,
type SendVideo = MultipartRequest<SendVideo>
pub fn send_video<C>(
&self,
chat_id: C,
video: InputFile
) -> <Bot as Requester>::SendVideo where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
video: InputFile
) -> <Bot as Requester>::SendVideo where
C: Into<ChatId>,
type SendAnimation = MultipartRequest<SendAnimation>
pub fn send_animation<C>(
&self,
chat_id: C,
animation: InputFile
) -> <Bot as Requester>::SendAnimation where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
animation: InputFile
) -> <Bot as Requester>::SendAnimation where
C: Into<ChatId>,
type SendVoice = MultipartRequest<SendVoice>
pub fn send_voice<C>(
&self,
chat_id: C,
voice: InputFile
) -> <Bot as Requester>::SendVoice where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
voice: InputFile
) -> <Bot as Requester>::SendVoice where
C: Into<ChatId>,
type SendVideoNote = MultipartRequest<SendVideoNote>
pub fn send_video_note<C>(
&self,
chat_id: C,
video_note: InputFile
) -> <Bot as Requester>::SendVideoNote where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
video_note: InputFile
) -> <Bot as Requester>::SendVideoNote where
C: Into<ChatId>,
type SendMediaGroup = MultipartRequest<SendMediaGroup>
pub fn send_media_group<C, M>(
&self,
chat_id: C,
media: M
) -> <Bot as Requester>::SendMediaGroup where
C: Into<ChatId>,
M: IntoIterator<Item = InputMedia>,
[src]
&self,
chat_id: C,
media: M
) -> <Bot as Requester>::SendMediaGroup where
C: Into<ChatId>,
M: IntoIterator<Item = InputMedia>,
type SendLocation = JsonRequest<SendLocation>
pub fn send_location<C>(
&self,
chat_id: C,
latitude: f64,
longitude: f64
) -> <Bot as Requester>::SendLocation where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
latitude: f64,
longitude: f64
) -> <Bot as Requester>::SendLocation where
C: Into<ChatId>,
type EditMessageLiveLocation = JsonRequest<EditMessageLiveLocation>
pub fn edit_message_live_location<C>(
&self,
chat_id: C,
message_id: i32,
latitude: f64,
longitude: f64
) -> <Bot as Requester>::EditMessageLiveLocation where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32,
latitude: f64,
longitude: f64
) -> <Bot as Requester>::EditMessageLiveLocation where
C: Into<ChatId>,
type EditMessageLiveLocationInline = JsonRequest<EditMessageLiveLocationInline>
pub fn edit_message_live_location_inline<I>(
&self,
inline_message_id: I,
latitude: f64,
longitude: f64
) -> <Bot as Requester>::EditMessageLiveLocationInline where
I: Into<String>,
[src]
&self,
inline_message_id: I,
latitude: f64,
longitude: f64
) -> <Bot as Requester>::EditMessageLiveLocationInline where
I: Into<String>,
type StopMessageLiveLocation = JsonRequest<StopMessageLiveLocation>
pub fn stop_message_live_location<C>(
&self,
chat_id: C,
message_id: i32,
latitude: f64,
longitude: f64
) -> <Bot as Requester>::StopMessageLiveLocation where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32,
latitude: f64,
longitude: f64
) -> <Bot as Requester>::StopMessageLiveLocation where
C: Into<ChatId>,
type StopMessageLiveLocationInline = JsonRequest<StopMessageLiveLocationInline>
pub fn stop_message_live_location_inline<I>(
&self,
inline_message_id: I,
latitude: f64,
longitude: f64
) -> <Bot as Requester>::StopMessageLiveLocationInline where
I: Into<String>,
[src]
&self,
inline_message_id: I,
latitude: f64,
longitude: f64
) -> <Bot as Requester>::StopMessageLiveLocationInline where
I: Into<String>,
type SendVenue = JsonRequest<SendVenue>
pub fn send_venue<C, T, A>(
&self,
chat_id: C,
latitude: f64,
longitude: f64,
title: T,
address: A
) -> <Bot as Requester>::SendVenue where
C: Into<ChatId>,
T: Into<String>,
A: Into<String>,
[src]
&self,
chat_id: C,
latitude: f64,
longitude: f64,
title: T,
address: A
) -> <Bot as Requester>::SendVenue where
C: Into<ChatId>,
T: Into<String>,
A: Into<String>,
type SendContact = JsonRequest<SendContact>
pub fn send_contact<C, P, F>(
&self,
chat_id: C,
phone_number: P,
first_name: F
) -> <Bot as Requester>::SendContact where
C: Into<ChatId>,
F: Into<String>,
P: Into<String>,
[src]
&self,
chat_id: C,
phone_number: P,
first_name: F
) -> <Bot as Requester>::SendContact where
C: Into<ChatId>,
F: Into<String>,
P: Into<String>,
type SendPoll = JsonRequest<SendPoll>
pub fn send_poll<C, Q, O>(
&self,
chat_id: C,
question: Q,
options: O,
type_: PollType
) -> <Bot as Requester>::SendPoll where
C: Into<ChatId>,
O: IntoIterator<Item = String>,
Q: Into<String>,
[src]
&self,
chat_id: C,
question: Q,
options: O,
type_: PollType
) -> <Bot as Requester>::SendPoll where
C: Into<ChatId>,
O: IntoIterator<Item = String>,
Q: Into<String>,
type SendDice = JsonRequest<SendDice>
pub fn send_dice<C>(&self, chat_id: C) -> <Bot as Requester>::SendDice where
C: Into<ChatId>,
[src]
C: Into<ChatId>,
type SendChatAction = JsonRequest<SendChatAction>
pub fn send_chat_action<C>(
&self,
chat_id: C,
action: ChatAction
) -> <Bot as Requester>::SendChatAction where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
action: ChatAction
) -> <Bot as Requester>::SendChatAction where
C: Into<ChatId>,
type GetUserProfilePhotos = JsonRequest<GetUserProfilePhotos>
pub fn get_user_profile_photos(
&self,
user_id: i64
) -> <Bot as Requester>::GetUserProfilePhotos
[src]
&self,
user_id: i64
) -> <Bot as Requester>::GetUserProfilePhotos
type GetFile = JsonRequest<GetFile>
pub fn get_file<F>(&self, file_id: F) -> <Bot as Requester>::GetFile where
F: Into<String>,
[src]
F: Into<String>,
type KickChatMember = JsonRequest<KickChatMember>
pub fn kick_chat_member<C>(
&self,
chat_id: C,
user_id: i64
) -> <Bot as Requester>::KickChatMember where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
user_id: i64
) -> <Bot as Requester>::KickChatMember where
C: Into<ChatId>,
type UnbanChatMember = JsonRequest<UnbanChatMember>
pub fn unban_chat_member<C>(
&self,
chat_id: C,
user_id: i64
) -> <Bot as Requester>::UnbanChatMember where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
user_id: i64
) -> <Bot as Requester>::UnbanChatMember where
C: Into<ChatId>,
type RestrictChatMember = JsonRequest<RestrictChatMember>
pub fn restrict_chat_member<C>(
&self,
chat_id: C,
user_id: i64,
permissions: ChatPermissions
) -> <Bot as Requester>::RestrictChatMember where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
user_id: i64,
permissions: ChatPermissions
) -> <Bot as Requester>::RestrictChatMember where
C: Into<ChatId>,
type PromoteChatMember = JsonRequest<PromoteChatMember>
pub fn promote_chat_member<C>(
&self,
chat_id: C,
user_id: i64
) -> <Bot as Requester>::PromoteChatMember where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
user_id: i64
) -> <Bot as Requester>::PromoteChatMember where
C: Into<ChatId>,
type SetChatAdministratorCustomTitle = JsonRequest<SetChatAdministratorCustomTitle>
pub fn set_chat_administrator_custom_title<Ch, Cu>(
&self,
chat_id: Ch,
user_id: i64,
custom_title: Cu
) -> <Bot as Requester>::SetChatAdministratorCustomTitle where
Ch: Into<ChatId>,
Cu: Into<String>,
[src]
&self,
chat_id: Ch,
user_id: i64,
custom_title: Cu
) -> <Bot as Requester>::SetChatAdministratorCustomTitle where
Ch: Into<ChatId>,
Cu: Into<String>,
type SetChatPermissions = JsonRequest<SetChatPermissions>
pub fn set_chat_permissions<C>(
&self,
chat_id: C,
permissions: ChatPermissions
) -> <Bot as Requester>::SetChatPermissions where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
permissions: ChatPermissions
) -> <Bot as Requester>::SetChatPermissions where
C: Into<ChatId>,
type ExportChatInviteLink = JsonRequest<ExportChatInviteLink>
pub fn export_chat_invite_link<C>(
&self,
chat_id: C
) -> <Bot as Requester>::ExportChatInviteLink where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Bot as Requester>::ExportChatInviteLink where
C: Into<ChatId>,
type CreateChatInviteLink = JsonRequest<CreateChatInviteLink>
pub fn create_chat_invite_link<C>(
&self,
chat_id: C
) -> <Bot as Requester>::CreateChatInviteLink where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Bot as Requester>::CreateChatInviteLink where
C: Into<ChatId>,
type EditChatInviteLink = JsonRequest<EditChatInviteLink>
pub fn edit_chat_invite_link<C, I>(
&self,
chat_id: C,
invite_link: I
) -> <Bot as Requester>::EditChatInviteLink where
C: Into<ChatId>,
I: Into<String>,
[src]
&self,
chat_id: C,
invite_link: I
) -> <Bot as Requester>::EditChatInviteLink where
C: Into<ChatId>,
I: Into<String>,
type RevokeChatInviteLink = JsonRequest<RevokeChatInviteLink>
pub fn revoke_chat_invite_link<C, I>(
&self,
chat_id: C,
invite_link: I
) -> <Bot as Requester>::RevokeChatInviteLink where
C: Into<ChatId>,
I: Into<String>,
[src]
&self,
chat_id: C,
invite_link: I
) -> <Bot as Requester>::RevokeChatInviteLink where
C: Into<ChatId>,
I: Into<String>,
type SetChatPhoto = MultipartRequest<SetChatPhoto>
pub fn set_chat_photo<C>(
&self,
chat_id: C,
photo: InputFile
) -> <Bot as Requester>::SetChatPhoto where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
photo: InputFile
) -> <Bot as Requester>::SetChatPhoto where
C: Into<ChatId>,
type DeleteChatPhoto = JsonRequest<DeleteChatPhoto>
pub fn delete_chat_photo<C>(
&self,
chat_id: C
) -> <Bot as Requester>::DeleteChatPhoto where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Bot as Requester>::DeleteChatPhoto where
C: Into<ChatId>,
type SetChatTitle = JsonRequest<SetChatTitle>
pub fn set_chat_title<C, T>(
&self,
chat_id: C,
title: T
) -> <Bot as Requester>::SetChatTitle where
C: Into<ChatId>,
T: Into<String>,
[src]
&self,
chat_id: C,
title: T
) -> <Bot as Requester>::SetChatTitle where
C: Into<ChatId>,
T: Into<String>,
type SetChatDescription = JsonRequest<SetChatDescription>
pub fn set_chat_description<C>(
&self,
chat_id: C
) -> <Bot as Requester>::SetChatDescription where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Bot as Requester>::SetChatDescription where
C: Into<ChatId>,
type PinChatMessage = JsonRequest<PinChatMessage>
pub fn pin_chat_message<C>(
&self,
chat_id: C,
message_id: i32
) -> <Bot as Requester>::PinChatMessage where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32
) -> <Bot as Requester>::PinChatMessage where
C: Into<ChatId>,
type UnpinChatMessage = JsonRequest<UnpinChatMessage>
pub fn unpin_chat_message<C>(
&self,
chat_id: C
) -> <Bot as Requester>::UnpinChatMessage where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Bot as Requester>::UnpinChatMessage where
C: Into<ChatId>,
type LeaveChat = JsonRequest<LeaveChat>
pub fn leave_chat<C>(&self, chat_id: C) -> <Bot as Requester>::LeaveChat where
C: Into<ChatId>,
[src]
C: Into<ChatId>,
type GetChat = JsonRequest<GetChat>
pub fn get_chat<C>(&self, chat_id: C) -> <Bot as Requester>::GetChat where
C: Into<ChatId>,
[src]
C: Into<ChatId>,
type GetChatAdministrators = JsonRequest<GetChatAdministrators>
pub fn get_chat_administrators<C>(
&self,
chat_id: C
) -> <Bot as Requester>::GetChatAdministrators where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Bot as Requester>::GetChatAdministrators where
C: Into<ChatId>,
type GetChatMembersCount = JsonRequest<GetChatMembersCount>
pub fn get_chat_members_count<C>(
&self,
chat_id: C
) -> <Bot as Requester>::GetChatMembersCount where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Bot as Requester>::GetChatMembersCount where
C: Into<ChatId>,
type GetChatMember = JsonRequest<GetChatMember>
pub fn get_chat_member<C>(
&self,
chat_id: C,
user_id: i64
) -> <Bot as Requester>::GetChatMember where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
user_id: i64
) -> <Bot as Requester>::GetChatMember where
C: Into<ChatId>,
type SetChatStickerSet = JsonRequest<SetChatStickerSet>
pub fn set_chat_sticker_set<C, S>(
&self,
chat_id: C,
sticker_set_name: S
) -> <Bot as Requester>::SetChatStickerSet where
C: Into<ChatId>,
S: Into<String>,
[src]
&self,
chat_id: C,
sticker_set_name: S
) -> <Bot as Requester>::SetChatStickerSet where
C: Into<ChatId>,
S: Into<String>,
type DeleteChatStickerSet = JsonRequest<DeleteChatStickerSet>
pub fn delete_chat_sticker_set<C>(
&self,
chat_id: C
) -> <Bot as Requester>::DeleteChatStickerSet where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Bot as Requester>::DeleteChatStickerSet where
C: Into<ChatId>,
type AnswerCallbackQuery = JsonRequest<AnswerCallbackQuery>
pub fn answer_callback_query<C>(
&self,
callback_query_id: C
) -> <Bot as Requester>::AnswerCallbackQuery where
C: Into<String>,
[src]
&self,
callback_query_id: C
) -> <Bot as Requester>::AnswerCallbackQuery where
C: Into<String>,
type SetMyCommands = JsonRequest<SetMyCommands>
pub fn set_my_commands<C>(
&self,
commands: C
) -> <Bot as Requester>::SetMyCommands where
C: IntoIterator<Item = BotCommand>,
[src]
&self,
commands: C
) -> <Bot as Requester>::SetMyCommands where
C: IntoIterator<Item = BotCommand>,
type GetMyCommands = JsonRequest<GetMyCommands>
pub fn get_my_commands(&self) -> <Bot as Requester>::GetMyCommands
[src]
type AnswerInlineQuery = JsonRequest<AnswerInlineQuery>
pub fn answer_inline_query<I, R>(
&self,
inline_query_id: I,
results: R
) -> <Bot as Requester>::AnswerInlineQuery where
R: IntoIterator<Item = InlineQueryResult>,
I: Into<String>,
[src]
&self,
inline_query_id: I,
results: R
) -> <Bot as Requester>::AnswerInlineQuery where
R: IntoIterator<Item = InlineQueryResult>,
I: Into<String>,
type EditMessageText = JsonRequest<EditMessageText>
pub fn edit_message_text<C, T>(
&self,
chat_id: C,
message_id: i32,
text: T
) -> <Bot as Requester>::EditMessageText where
C: Into<ChatId>,
T: Into<String>,
[src]
&self,
chat_id: C,
message_id: i32,
text: T
) -> <Bot as Requester>::EditMessageText where
C: Into<ChatId>,
T: Into<String>,
type EditMessageTextInline = JsonRequest<EditMessageTextInline>
pub fn edit_message_text_inline<I, T>(
&self,
inline_message_id: I,
text: T
) -> <Bot as Requester>::EditMessageTextInline where
T: Into<String>,
I: Into<String>,
[src]
&self,
inline_message_id: I,
text: T
) -> <Bot as Requester>::EditMessageTextInline where
T: Into<String>,
I: Into<String>,
type EditMessageCaption = JsonRequest<EditMessageCaption>
pub fn edit_message_caption<C>(
&self,
chat_id: C,
message_id: i32
) -> <Bot as Requester>::EditMessageCaption where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32
) -> <Bot as Requester>::EditMessageCaption where
C: Into<ChatId>,
type EditMessageCaptionInline = JsonRequest<EditMessageCaptionInline>
pub fn edit_message_caption_inline<I>(
&self,
inline_message_id: I
) -> <Bot as Requester>::EditMessageCaptionInline where
I: Into<String>,
[src]
&self,
inline_message_id: I
) -> <Bot as Requester>::EditMessageCaptionInline where
I: Into<String>,
type EditMessageMedia = MultipartRequest<EditMessageMedia>
pub fn edit_message_media<C>(
&self,
chat_id: C,
message_id: i32,
media: InputMedia
) -> <Bot as Requester>::EditMessageMedia where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32,
media: InputMedia
) -> <Bot as Requester>::EditMessageMedia where
C: Into<ChatId>,
type EditMessageMediaInline = MultipartRequest<EditMessageMediaInline>
pub fn edit_message_media_inline<I>(
&self,
inline_message_id: I,
media: InputMedia
) -> <Bot as Requester>::EditMessageMediaInline where
I: Into<String>,
[src]
&self,
inline_message_id: I,
media: InputMedia
) -> <Bot as Requester>::EditMessageMediaInline where
I: Into<String>,
type EditMessageReplyMarkup = JsonRequest<EditMessageReplyMarkup>
pub fn edit_message_reply_markup<C>(
&self,
chat_id: C,
message_id: i32
) -> <Bot as Requester>::EditMessageReplyMarkup where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32
) -> <Bot as Requester>::EditMessageReplyMarkup where
C: Into<ChatId>,
type EditMessageReplyMarkupInline = JsonRequest<EditMessageReplyMarkupInline>
pub fn edit_message_reply_markup_inline<I>(
&self,
inline_message_id: I
) -> <Bot as Requester>::EditMessageReplyMarkupInline where
I: Into<String>,
[src]
&self,
inline_message_id: I
) -> <Bot as Requester>::EditMessageReplyMarkupInline where
I: Into<String>,
type StopPoll = JsonRequest<StopPoll>
pub fn stop_poll<C>(
&self,
chat_id: C,
message_id: i32
) -> <Bot as Requester>::StopPoll where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32
) -> <Bot as Requester>::StopPoll where
C: Into<ChatId>,
type DeleteMessage = JsonRequest<DeleteMessage>
pub fn delete_message<C>(
&self,
chat_id: C,
message_id: i32
) -> <Bot as Requester>::DeleteMessage where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32
) -> <Bot as Requester>::DeleteMessage where
C: Into<ChatId>,
type SendSticker = MultipartRequest<SendSticker>
pub fn send_sticker<C>(
&self,
chat_id: C,
sticker: InputFile
) -> <Bot as Requester>::SendSticker where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
sticker: InputFile
) -> <Bot as Requester>::SendSticker where
C: Into<ChatId>,
type GetStickerSet = JsonRequest<GetStickerSet>
pub fn get_sticker_set<N>(&self, name: N) -> <Bot as Requester>::GetStickerSet where
N: Into<String>,
[src]
N: Into<String>,
type UploadStickerFile = MultipartRequest<UploadStickerFile>
pub fn upload_sticker_file(
&self,
user_id: i64,
png_sticker: InputFile
) -> <Bot as Requester>::UploadStickerFile
[src]
&self,
user_id: i64,
png_sticker: InputFile
) -> <Bot as Requester>::UploadStickerFile
type CreateNewStickerSet = MultipartRequest<CreateNewStickerSet>
pub fn create_new_sticker_set<N, T, E>(
&self,
user_id: i64,
name: N,
title: T,
sticker: InputSticker,
emojis: E
) -> <Bot as Requester>::CreateNewStickerSet where
T: Into<String>,
E: Into<String>,
N: Into<String>,
[src]
&self,
user_id: i64,
name: N,
title: T,
sticker: InputSticker,
emojis: E
) -> <Bot as Requester>::CreateNewStickerSet where
T: Into<String>,
E: Into<String>,
N: Into<String>,
type AddStickerToSet = MultipartRequest<AddStickerToSet>
pub fn add_sticker_to_set<N, E>(
&self,
user_id: i64,
name: N,
sticker: InputSticker,
emojis: E
) -> <Bot as Requester>::AddStickerToSet where
E: Into<String>,
N: Into<String>,
[src]
&self,
user_id: i64,
name: N,
sticker: InputSticker,
emojis: E
) -> <Bot as Requester>::AddStickerToSet where
E: Into<String>,
N: Into<String>,
type SetStickerPositionInSet = JsonRequest<SetStickerPositionInSet>
pub fn set_sticker_position_in_set<S>(
&self,
sticker: S,
position: u32
) -> <Bot as Requester>::SetStickerPositionInSet where
S: Into<String>,
[src]
&self,
sticker: S,
position: u32
) -> <Bot as Requester>::SetStickerPositionInSet where
S: Into<String>,
type DeleteStickerFromSet = JsonRequest<DeleteStickerFromSet>
pub fn delete_sticker_from_set<S>(
&self,
sticker: S
) -> <Bot as Requester>::DeleteStickerFromSet where
S: Into<String>,
[src]
&self,
sticker: S
) -> <Bot as Requester>::DeleteStickerFromSet where
S: Into<String>,
type SetStickerSetThumb = MultipartRequest<SetStickerSetThumb>
pub fn set_sticker_set_thumb<N>(
&self,
name: N,
user_id: i64
) -> <Bot as Requester>::SetStickerSetThumb where
N: Into<String>,
[src]
&self,
name: N,
user_id: i64
) -> <Bot as Requester>::SetStickerSetThumb where
N: Into<String>,
type SendInvoice = JsonRequest<SendInvoice>
pub fn send_invoice<T, D, Pa, P, S, C, Pri>(
&self,
chat_id: i32,
title: T,
description: D,
payload: Pa,
provider_token: P,
start_parameter: S,
currency: C,
prices: Pri
) -> <Bot as Requester>::SendInvoice where
C: Into<String>,
T: Into<String>,
D: Into<String>,
S: Into<String>,
P: Into<String>,
Pa: Into<String>,
Pri: IntoIterator<Item = LabeledPrice>,
[src]
&self,
chat_id: i32,
title: T,
description: D,
payload: Pa,
provider_token: P,
start_parameter: S,
currency: C,
prices: Pri
) -> <Bot as Requester>::SendInvoice where
C: Into<String>,
T: Into<String>,
D: Into<String>,
S: Into<String>,
P: Into<String>,
Pa: Into<String>,
Pri: IntoIterator<Item = LabeledPrice>,
type AnswerShippingQuery = JsonRequest<AnswerShippingQuery>
pub fn answer_shipping_query<S>(
&self,
shipping_query_id: S,
ok: bool
) -> <Bot as Requester>::AnswerShippingQuery where
S: Into<String>,
[src]
&self,
shipping_query_id: S,
ok: bool
) -> <Bot as Requester>::AnswerShippingQuery where
S: Into<String>,
type AnswerPreCheckoutQuery = JsonRequest<AnswerPreCheckoutQuery>
pub fn answer_pre_checkout_query<P>(
&self,
pre_checkout_query_id: P,
ok: bool
) -> <Bot as Requester>::AnswerPreCheckoutQuery where
P: Into<String>,
[src]
&self,
pre_checkout_query_id: P,
ok: bool
) -> <Bot as Requester>::AnswerPreCheckoutQuery where
P: Into<String>,
type SetPassportDataErrors = JsonRequest<SetPassportDataErrors>
pub fn set_passport_data_errors<E>(
&self,
user_id: i64,
errors: E
) -> <Bot as Requester>::SetPassportDataErrors where
E: IntoIterator<Item = PassportElementError>,
[src]
&self,
user_id: i64,
errors: E
) -> <Bot as Requester>::SetPassportDataErrors where
E: IntoIterator<Item = PassportElementError>,
type SendGame = JsonRequest<SendGame>
pub fn send_game<G>(
&self,
chat_id: u32,
game_short_name: G
) -> <Bot as Requester>::SendGame where
G: Into<String>,
[src]
&self,
chat_id: u32,
game_short_name: G
) -> <Bot as Requester>::SendGame where
G: Into<String>,
type SetGameScore = JsonRequest<SetGameScore>
pub fn set_game_score(
&self,
user_id: i64,
score: u64,
chat_id: u32,
message_id: i64
) -> <Bot as Requester>::SetGameScore
[src]
&self,
user_id: i64,
score: u64,
chat_id: u32,
message_id: i64
) -> <Bot as Requester>::SetGameScore
type SetGameScoreInline = JsonRequest<SetGameScoreInline>
pub fn set_game_score_inline<I>(
&self,
user_id: i64,
score: u64,
inline_message_id: I
) -> <Bot as Requester>::SetGameScoreInline where
I: Into<String>,
[src]
&self,
user_id: i64,
score: u64,
inline_message_id: I
) -> <Bot as Requester>::SetGameScoreInline where
I: Into<String>,
type GetGameHighScores = JsonRequest<GetGameHighScores>
pub fn get_game_high_scores<T>(
&self,
user_id: i64,
target: T
) -> <Bot as Requester>::GetGameHighScores where
T: Into<TargetMessage>,
[src]
&self,
user_id: i64,
target: T
) -> <Bot as Requester>::GetGameHighScores where
T: Into<TargetMessage>,
type LogOut = JsonRequest<LogOut>
pub fn log_out(&self) -> <Bot as Requester>::LogOut
[src]
type Close = JsonRequest<Close>
pub fn close(&self) -> <Bot as Requester>::Close
[src]
type CopyMessage = JsonRequest<CopyMessage>
pub fn copy_message<C, F>(
&self,
chat_id: C,
from_chat_id: F,
message_id: i32
) -> <Bot as Requester>::CopyMessage where
C: Into<ChatId>,
F: Into<ChatId>,
[src]
&self,
chat_id: C,
from_chat_id: F,
message_id: i32
) -> <Bot as Requester>::CopyMessage where
C: Into<ChatId>,
F: Into<ChatId>,
type UnpinAllChatMessages = JsonRequest<UnpinAllChatMessages>
pub fn unpin_all_chat_messages<C>(
&self,
chat_id: C
) -> <Bot as Requester>::UnpinAllChatMessages where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Bot as Requester>::UnpinAllChatMessages where
C: Into<ChatId>,
type GetUpdatesFaultTolerant = JsonRequest<GetUpdatesFaultTolerant>
pub fn get_updates_fault_tolerant(
&self
) -> <Bot as Requester>::GetUpdatesFaultTolerant
[src]
&self
) -> <Bot as Requester>::GetUpdatesFaultTolerant
Auto Trait Implementations
impl !RefUnwindSafe for Bot
impl Send for Bot
impl Sync for Bot
impl Unpin for Bot
impl !UnwindSafe for Bot
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Conv for T
impl<T> Conv for T
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
type Remainder = Choices
pub fn subset(
self
) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>
self
) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>
impl<T> FmtForward for T
pub fn fmt_binary(self) -> FmtBinary<Self> where
Self: Binary,
Self: Binary,
pub fn fmt_display(self) -> FmtDisplay<Self> where
Self: Display,
Self: Display,
pub fn fmt_lower_exp(self) -> FmtLowerExp<Self> where
Self: LowerExp,
Self: LowerExp,
pub fn fmt_lower_hex(self) -> FmtLowerHex<Self> where
Self: LowerHex,
Self: LowerHex,
pub fn fmt_octal(self) -> FmtOctal<Self> where
Self: Octal,
Self: Octal,
pub fn fmt_pointer(self) -> FmtPointer<Self> where
Self: Pointer,
Self: Pointer,
pub fn fmt_upper_exp(self) -> FmtUpperExp<Self> where
Self: UpperExp,
Self: UpperExp,
pub fn fmt_upper_hex(self) -> FmtUpperHex<Self> where
Self: UpperHex,
Self: UpperHex,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U, I> LiftInto<U, I> for T where
U: LiftFrom<T, I>,
U: LiftFrom<T, I>,
pub fn lift_into(self) -> U
impl<T> Pipe for T where
T: ?Sized,
T: ?Sized,
pub fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
pub fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
R: 'a,
pub fn pipe_ref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self) -> R
) -> R where
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut Self) -> R
) -> R where
R: 'a,
pub fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
R: 'a,
B: 'a + ?Sized,
Self: Borrow<B>,
R: 'a,
B: 'a + ?Sized,
pub fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
R: 'a,
B: 'a + ?Sized,
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
R: 'a,
B: 'a + ?Sized,
pub fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
R: 'a,
U: 'a + ?Sized,
Self: AsRef<U>,
R: 'a,
U: 'a + ?Sized,
pub fn pipe_as_mut<'a, U, R>(
&'a mut self,
func: impl FnOnce(&'a mut U) -> R
) -> R where
Self: AsMut<U>,
R: 'a,
U: 'a + ?Sized,
&'a mut self,
func: impl FnOnce(&'a mut U) -> R
) -> R where
Self: AsMut<U>,
R: 'a,
U: 'a + ?Sized,
pub fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
pub fn pipe_deref_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: DerefMut<Target = T> + Deref,
T: 'a + ?Sized,
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: DerefMut<Target = T> + Deref,
T: 'a + ?Sized,
R: 'a,
impl<T> Pipe for T
impl<T> PipeAsRef for T
pub fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
Self: AsRef<T>,
T: 'a,
R: 'a,
pub fn pipe_as_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: AsMut<T>,
T: 'a,
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: AsMut<T>,
T: 'a,
R: 'a,
impl<T> PipeBorrow for T
pub fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
Self: Borrow<T>,
T: 'a,
R: 'a,
pub fn pipe_borrow_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
T: 'a,
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
T: 'a,
R: 'a,
impl<T> PipeDeref for T
pub fn pipe_deref<'a, R>(
&'a self,
func: impl FnOnce(&'a Self::Target) -> R
) -> R where
Self: Deref,
R: 'a,
&'a self,
func: impl FnOnce(&'a Self::Target) -> R
) -> R where
Self: Deref,
R: 'a,
pub fn pipe_deref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
impl<T> PipeRef for T
pub fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
R: 'a,
pub fn pipe_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
R: 'a,
R: 'a,
impl<T> RequesterExt for T where
T: Requester,
[src]
T: Requester,
pub fn cache_me(self) -> CacheMe<Self>
[src]
pub fn auto_send(self) -> AutoSend<Self>
[src]
pub fn throttle(self, limits: Limits) -> Throttle<Self> where
Self: 'static,
[src]
Self: 'static,
pub fn parse_mode(self, parse_mode: ParseMode) -> DefaultParseMode<Self>
[src]
impl<Source> Sculptor<HNil, HNil> for Source
impl<T> Tap for T
pub fn tap(self, func: impl FnOnce(&Self)) -> Self
pub fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self
pub fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Self: Borrow<B>,
B: ?Sized,
pub fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Self: BorrowMut<B>,
B: ?Sized,
pub fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Self: AsRef<R>,
R: ?Sized,
pub fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Self: AsMut<R>,
R: ?Sized,
pub fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
Self: Deref<Target = T>,
T: ?Sized,
pub fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
pub fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
pub fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
pub fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Self: Borrow<B>,
B: ?Sized,
pub fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Self: BorrowMut<B>,
B: ?Sized,
pub fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Self: AsRef<R>,
R: ?Sized,
pub fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Self: AsMut<R>,
R: ?Sized,
pub fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
Self: Deref<Target = T>,
T: ?Sized,
pub fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
impl<T> Tap for T
pub fn tap<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
F: FnOnce(&Self) -> R,
pub fn tap_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
F: FnOnce(&Self) -> R,
pub fn tap_mut<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
F: FnOnce(&mut Self) -> R,
pub fn tap_mut_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
F: FnOnce(&mut Self) -> R,
impl<T, U> TapAsRef<U> for T where
U: ?Sized,
U: ?Sized,
pub fn tap_ref<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
Self: AsRef<T>,
F: FnOnce(&T) -> R,
pub fn tap_ref_dbg<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
Self: AsRef<T>,
F: FnOnce(&T) -> R,
pub fn tap_ref_mut<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
pub fn tap_ref_mut_dbg<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
impl<T, U> TapBorrow<U> for T where
U: ?Sized,
U: ?Sized,
pub fn tap_borrow<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Self: Borrow<T>,
F: FnOnce(&T) -> R,
pub fn tap_borrow_dbg<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Self: Borrow<T>,
F: FnOnce(&T) -> R,
pub fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
pub fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
impl<T> TapDeref for T
pub fn tap_deref<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Self: Deref,
F: FnOnce(&Self::Target) -> R,
pub fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Self: Deref,
F: FnOnce(&Self::Target) -> R,
pub fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
pub fn tap_deref_mut_dbg<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> TryConv for T
impl<T> TryConv for T
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,