Struct teloxide::adaptors::Throttle [−][src]
Automatic request limits respecting mechanism.
Telegram has strict limits, which, if exceeded will sooner or later cause
RequestError::RetryAfter(_)
errors. These errors can cause users of your
bot to never receive responds from the bot or receive them in wrong order.
This bot wrapper automatically checks for limits, suspending requests until they could be sent without exceeding limits (request order in chats is not changed).
It’s recommended to use this wrapper before other wrappers (i.e.:
SomeWrapper<Throttle<Bot>>
) because if done otherwise inner wrappers may
cause Throttle
to miscalculate limits usage.
Examples
use teloxide_core::{adaptors::throttle::Limits, requests::RequesterExt, Bot}; let bot = Bot::new("TOKEN").throttle(Limits::default()); /* send many requests here */
Note about send-by-@channelusername
Telegram have limits on sending messages to the same chat. To check them
we store chat_id
s of several last requests. However there is no good way
to tell if given ChatId::Id(x)
corresponds to the same chat as
ChatId::ChannelUsername(u)
.
Our current approach is to just give up and check chat_id_a == chat_id_b
.
This may give incorrect results.
As such, we encourage not to use ChatId::ChannelUsername(u)
with this bot
wrapper.
Implementations
impl<B> Throttle<B>
[src]
pub fn new(bot: B, limits: Limits) -> (Throttle<B>, impl Future<Output = ()>)
[src]
Creates new Throttle
alongside with worker future.
Note: Throttle
will only send requests if returned worker is
polled/spawned/awaited.
pub fn new_spawn(bot: B, limits: Limits) -> Throttle<B> where
B: 'static,
[src]
B: 'static,
Creates new Throttle
spawning the worker with tokio::spawn
Note: it’s recommended to use RequesterExt::throttle
instead.
pub fn inner(&self) -> &B
[src]
Allows to access inner bot
pub fn into_inner(self) -> B
[src]
Unwraps inner bot
Trait Implementations
impl<'w, B> Download<'w> for Throttle<B> where
B: Download<'w>,
[src]
B: Download<'w>,
type Err = <B as Download<'w>>::Err
An error returned from download_file
.
type Fut = <B as Download<'w>>::Fut
A future returned from download_file
.
pub fn download_file(
&self,
path: &str,
destination: &'w mut (dyn AsyncWrite + 'w + Send + Unpin)
) -> <Throttle<B> as Download<'w>>::Fut
[src]
&self,
path: &str,
destination: &'w mut (dyn AsyncWrite + 'w + Send + Unpin)
) -> <Throttle<B> as Download<'w>>::Fut
type StreamErr = <B as Download<'w>>::StreamErr
An error returned from
download_file_stream
. Read more
type Stream = <B as Download<'w>>::Stream
A stream returned from download_file_stream
. Read more
pub fn download_file_stream(
&self,
path: &str
) -> <Throttle<B> as Download<'w>>::Stream
[src]
&self,
path: &str
) -> <Throttle<B> as Download<'w>>::Stream
impl<B> Requester for Throttle<B> where
B: Requester,
<B as Requester>::SendMessage: Send,
<B as Requester>::ForwardMessage: Send,
<B as Requester>::CopyMessage: Send,
<B as Requester>::SendPhoto: Send,
<B as Requester>::SendAudio: Send,
<B as Requester>::SendDocument: Send,
<B as Requester>::SendVideo: Send,
<B as Requester>::SendAnimation: Send,
<B as Requester>::SendVoice: Send,
<B as Requester>::SendVideoNote: Send,
<B as Requester>::SendMediaGroup: Send,
<B as Requester>::SendLocation: Send,
<B as Requester>::SendVenue: Send,
<B as Requester>::SendContact: Send,
<B as Requester>::SendPoll: Send,
<B as Requester>::SendDice: Send,
<B as Requester>::SendSticker: Send,
<B as Requester>::SendInvoice: Send,
[src]
B: Requester,
<B as Requester>::SendMessage: Send,
<B as Requester>::ForwardMessage: Send,
<B as Requester>::CopyMessage: Send,
<B as Requester>::SendPhoto: Send,
<B as Requester>::SendAudio: Send,
<B as Requester>::SendDocument: Send,
<B as Requester>::SendVideo: Send,
<B as Requester>::SendAnimation: Send,
<B as Requester>::SendVoice: Send,
<B as Requester>::SendVideoNote: Send,
<B as Requester>::SendMediaGroup: Send,
<B as Requester>::SendLocation: Send,
<B as Requester>::SendVenue: Send,
<B as Requester>::SendContact: Send,
<B as Requester>::SendPoll: Send,
<B as Requester>::SendDice: Send,
<B as Requester>::SendSticker: Send,
<B as Requester>::SendInvoice: Send,
type Err = <B as Requester>::Err
Error type returned by all requests.
type SendMessage = ThrottlingRequest<<B as Requester>::SendMessage>
pub fn send_message<C, T>(
&self,
chat_id: C,
text: T
) -> <Throttle<B> as Requester>::SendMessage where
C: Into<ChatId>,
T: Into<String>,
[src]
&self,
chat_id: C,
text: T
) -> <Throttle<B> as Requester>::SendMessage where
C: Into<ChatId>,
T: Into<String>,
type ForwardMessage = ThrottlingRequest<<B as Requester>::ForwardMessage>
pub fn forward_message<C, F>(
&self,
chat_id: C,
from_chat_id: F,
message_id: i32
) -> <Throttle<B> as Requester>::ForwardMessage where
C: Into<ChatId>,
F: Into<ChatId>,
[src]
&self,
chat_id: C,
from_chat_id: F,
message_id: i32
) -> <Throttle<B> as Requester>::ForwardMessage where
C: Into<ChatId>,
F: Into<ChatId>,
type CopyMessage = ThrottlingRequest<<B as Requester>::CopyMessage>
pub fn copy_message<C, F>(
&self,
chat_id: C,
from_chat_id: F,
message_id: i32
) -> <Throttle<B> as Requester>::CopyMessage where
C: Into<ChatId>,
F: Into<ChatId>,
[src]
&self,
chat_id: C,
from_chat_id: F,
message_id: i32
) -> <Throttle<B> as Requester>::CopyMessage where
C: Into<ChatId>,
F: Into<ChatId>,
type SendPhoto = ThrottlingRequest<<B as Requester>::SendPhoto>
pub fn send_photo<C>(
&self,
chat_id: C,
photo: InputFile
) -> <Throttle<B> as Requester>::SendPhoto where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
photo: InputFile
) -> <Throttle<B> as Requester>::SendPhoto where
C: Into<ChatId>,
type SendAudio = ThrottlingRequest<<B as Requester>::SendAudio>
pub fn send_audio<C>(
&self,
chat_id: C,
audio: InputFile
) -> <Throttle<B> as Requester>::SendAudio where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
audio: InputFile
) -> <Throttle<B> as Requester>::SendAudio where
C: Into<ChatId>,
type SendDocument = ThrottlingRequest<<B as Requester>::SendDocument>
pub fn send_document<C>(
&self,
chat_id: C,
document: InputFile
) -> <Throttle<B> as Requester>::SendDocument where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
document: InputFile
) -> <Throttle<B> as Requester>::SendDocument where
C: Into<ChatId>,
type SendVideo = ThrottlingRequest<<B as Requester>::SendVideo>
pub fn send_video<C>(
&self,
chat_id: C,
video: InputFile
) -> <Throttle<B> as Requester>::SendVideo where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
video: InputFile
) -> <Throttle<B> as Requester>::SendVideo where
C: Into<ChatId>,
type SendAnimation = ThrottlingRequest<<B as Requester>::SendAnimation>
pub fn send_animation<C>(
&self,
chat_id: C,
animation: InputFile
) -> <Throttle<B> as Requester>::SendAnimation where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
animation: InputFile
) -> <Throttle<B> as Requester>::SendAnimation where
C: Into<ChatId>,
type SendVoice = ThrottlingRequest<<B as Requester>::SendVoice>
pub fn send_voice<C>(
&self,
chat_id: C,
voice: InputFile
) -> <Throttle<B> as Requester>::SendVoice where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
voice: InputFile
) -> <Throttle<B> as Requester>::SendVoice where
C: Into<ChatId>,
type SendVideoNote = ThrottlingRequest<<B as Requester>::SendVideoNote>
pub fn send_video_note<C>(
&self,
chat_id: C,
video_note: InputFile
) -> <Throttle<B> as Requester>::SendVideoNote where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
video_note: InputFile
) -> <Throttle<B> as Requester>::SendVideoNote where
C: Into<ChatId>,
type SendMediaGroup = ThrottlingRequest<<B as Requester>::SendMediaGroup>
pub fn send_media_group<C, M>(
&self,
chat_id: C,
media: M
) -> <Throttle<B> as Requester>::SendMediaGroup where
C: Into<ChatId>,
M: IntoIterator<Item = InputMedia>,
[src]
&self,
chat_id: C,
media: M
) -> <Throttle<B> as Requester>::SendMediaGroup where
C: Into<ChatId>,
M: IntoIterator<Item = InputMedia>,
type SendLocation = ThrottlingRequest<<B as Requester>::SendLocation>
pub fn send_location<C>(
&self,
chat_id: C,
latitude: f64,
longitude: f64
) -> <Throttle<B> as Requester>::SendLocation where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
latitude: f64,
longitude: f64
) -> <Throttle<B> as Requester>::SendLocation where
C: Into<ChatId>,
type SendVenue = ThrottlingRequest<<B as Requester>::SendVenue>
pub fn send_venue<C, T, A>(
&self,
chat_id: C,
latitude: f64,
longitude: f64,
title: T,
address: A
) -> <Throttle<B> 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
) -> <Throttle<B> as Requester>::SendVenue where
C: Into<ChatId>,
T: Into<String>,
A: Into<String>,
type SendContact = ThrottlingRequest<<B as Requester>::SendContact>
pub fn send_contact<C, P, F>(
&self,
chat_id: C,
phone_number: P,
first_name: F
) -> <Throttle<B> as Requester>::SendContact where
C: Into<ChatId>,
F: Into<String>,
P: Into<String>,
[src]
&self,
chat_id: C,
phone_number: P,
first_name: F
) -> <Throttle<B> as Requester>::SendContact where
C: Into<ChatId>,
F: Into<String>,
P: Into<String>,
type SendPoll = ThrottlingRequest<<B as Requester>::SendPoll>
pub fn send_poll<C, Q, O>(
&self,
chat_id: C,
question: Q,
options: O,
type_: PollType
) -> <Throttle<B> 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
) -> <Throttle<B> as Requester>::SendPoll where
C: Into<ChatId>,
O: IntoIterator<Item = String>,
Q: Into<String>,
type SendDice = ThrottlingRequest<<B as Requester>::SendDice>
pub fn send_dice<C>(&self, chat_id: C) -> <Throttle<B> as Requester>::SendDice where
C: Into<ChatId>,
[src]
C: Into<ChatId>,
type SendSticker = ThrottlingRequest<<B as Requester>::SendSticker>
pub fn send_sticker<C>(
&self,
chat_id: C,
sticker: InputFile
) -> <Throttle<B> as Requester>::SendSticker where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
sticker: InputFile
) -> <Throttle<B> as Requester>::SendSticker where
C: Into<ChatId>,
type SendInvoice = ThrottlingRequest<<B as Requester>::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
) -> <Throttle<B> 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
) -> <Throttle<B> 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 GetMe = <B as Requester>::GetMe
pub fn get_me(&self) -> <Throttle<B> as Requester>::GetMe
[src]
type LogOut = <B as Requester>::LogOut
pub fn log_out(&self) -> <Throttle<B> as Requester>::LogOut
[src]
type Close = <B as Requester>::Close
pub fn close(&self) -> <Throttle<B> as Requester>::Close
[src]
type GetUpdates = <B as Requester>::GetUpdates
pub fn get_updates(&self) -> <Throttle<B> as Requester>::GetUpdates
[src]
type SetWebhook = <B as Requester>::SetWebhook
pub fn set_webhook<U>(&self, url: U) -> <Throttle<B> as Requester>::SetWebhook where
U: Into<String>,
[src]
U: Into<String>,
type DeleteWebhook = <B as Requester>::DeleteWebhook
pub fn delete_webhook(&self) -> <Throttle<B> as Requester>::DeleteWebhook
[src]
type GetWebhookInfo = <B as Requester>::GetWebhookInfo
pub fn get_webhook_info(&self) -> <Throttle<B> as Requester>::GetWebhookInfo
[src]
type EditMessageLiveLocation = <B as Requester>::EditMessageLiveLocation
pub fn edit_message_live_location<C>(
&self,
chat_id: C,
message_id: i32,
latitude: f64,
longitude: f64
) -> <Throttle<B> as Requester>::EditMessageLiveLocation where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32,
latitude: f64,
longitude: f64
) -> <Throttle<B> as Requester>::EditMessageLiveLocation where
C: Into<ChatId>,
type EditMessageLiveLocationInline = <B as Requester>::EditMessageLiveLocationInline
pub fn edit_message_live_location_inline<I>(
&self,
inline_message_id: I,
latitude: f64,
longitude: f64
) -> <Throttle<B> as Requester>::EditMessageLiveLocationInline where
I: Into<String>,
[src]
&self,
inline_message_id: I,
latitude: f64,
longitude: f64
) -> <Throttle<B> as Requester>::EditMessageLiveLocationInline where
I: Into<String>,
type StopMessageLiveLocation = <B as Requester>::StopMessageLiveLocation
pub fn stop_message_live_location<C>(
&self,
chat_id: C,
message_id: i32,
latitude: f64,
longitude: f64
) -> <Throttle<B> as Requester>::StopMessageLiveLocation where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32,
latitude: f64,
longitude: f64
) -> <Throttle<B> as Requester>::StopMessageLiveLocation where
C: Into<ChatId>,
type StopMessageLiveLocationInline = <B as Requester>::StopMessageLiveLocationInline
pub fn stop_message_live_location_inline<I>(
&self,
inline_message_id: I,
latitude: f64,
longitude: f64
) -> <Throttle<B> as Requester>::StopMessageLiveLocationInline where
I: Into<String>,
[src]
&self,
inline_message_id: I,
latitude: f64,
longitude: f64
) -> <Throttle<B> as Requester>::StopMessageLiveLocationInline where
I: Into<String>,
type SendChatAction = <B as Requester>::SendChatAction
pub fn send_chat_action<C>(
&self,
chat_id: C,
action: ChatAction
) -> <Throttle<B> as Requester>::SendChatAction where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
action: ChatAction
) -> <Throttle<B> as Requester>::SendChatAction where
C: Into<ChatId>,
type GetUserProfilePhotos = <B as Requester>::GetUserProfilePhotos
pub fn get_user_profile_photos(
&self,
user_id: i64
) -> <Throttle<B> as Requester>::GetUserProfilePhotos
[src]
&self,
user_id: i64
) -> <Throttle<B> as Requester>::GetUserProfilePhotos
type GetFile = <B as Requester>::GetFile
pub fn get_file<F>(&self, file_id: F) -> <Throttle<B> as Requester>::GetFile where
F: Into<String>,
[src]
F: Into<String>,
type KickChatMember = <B as Requester>::KickChatMember
pub fn kick_chat_member<C>(
&self,
chat_id: C,
user_id: i64
) -> <Throttle<B> as Requester>::KickChatMember where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
user_id: i64
) -> <Throttle<B> as Requester>::KickChatMember where
C: Into<ChatId>,
type UnbanChatMember = <B as Requester>::UnbanChatMember
pub fn unban_chat_member<C>(
&self,
chat_id: C,
user_id: i64
) -> <Throttle<B> as Requester>::UnbanChatMember where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
user_id: i64
) -> <Throttle<B> as Requester>::UnbanChatMember where
C: Into<ChatId>,
type RestrictChatMember = <B as Requester>::RestrictChatMember
pub fn restrict_chat_member<C>(
&self,
chat_id: C,
user_id: i64,
permissions: ChatPermissions
) -> <Throttle<B> as Requester>::RestrictChatMember where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
user_id: i64,
permissions: ChatPermissions
) -> <Throttle<B> as Requester>::RestrictChatMember where
C: Into<ChatId>,
type PromoteChatMember = <B as Requester>::PromoteChatMember
pub fn promote_chat_member<C>(
&self,
chat_id: C,
user_id: i64
) -> <Throttle<B> as Requester>::PromoteChatMember where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
user_id: i64
) -> <Throttle<B> as Requester>::PromoteChatMember where
C: Into<ChatId>,
type SetChatAdministratorCustomTitle = <B as Requester>::SetChatAdministratorCustomTitle
pub fn set_chat_administrator_custom_title<Ch, Cu>(
&self,
chat_id: Ch,
user_id: i64,
custom_title: Cu
) -> <Throttle<B> as Requester>::SetChatAdministratorCustomTitle where
Ch: Into<ChatId>,
Cu: Into<String>,
[src]
&self,
chat_id: Ch,
user_id: i64,
custom_title: Cu
) -> <Throttle<B> as Requester>::SetChatAdministratorCustomTitle where
Ch: Into<ChatId>,
Cu: Into<String>,
type SetChatPermissions = <B as Requester>::SetChatPermissions
pub fn set_chat_permissions<C>(
&self,
chat_id: C,
permissions: ChatPermissions
) -> <Throttle<B> as Requester>::SetChatPermissions where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
permissions: ChatPermissions
) -> <Throttle<B> as Requester>::SetChatPermissions where
C: Into<ChatId>,
type ExportChatInviteLink = <B as Requester>::ExportChatInviteLink
pub fn export_chat_invite_link<C>(
&self,
chat_id: C
) -> <Throttle<B> as Requester>::ExportChatInviteLink where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Throttle<B> as Requester>::ExportChatInviteLink where
C: Into<ChatId>,
type CreateChatInviteLink = <B as Requester>::CreateChatInviteLink
pub fn create_chat_invite_link<C>(
&self,
chat_id: C
) -> <Throttle<B> as Requester>::CreateChatInviteLink where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Throttle<B> as Requester>::CreateChatInviteLink where
C: Into<ChatId>,
type EditChatInviteLink = <B as Requester>::EditChatInviteLink
pub fn edit_chat_invite_link<C, I>(
&self,
chat_id: C,
invite_link: I
) -> <Throttle<B> as Requester>::EditChatInviteLink where
C: Into<ChatId>,
I: Into<String>,
[src]
&self,
chat_id: C,
invite_link: I
) -> <Throttle<B> as Requester>::EditChatInviteLink where
C: Into<ChatId>,
I: Into<String>,
type RevokeChatInviteLink = <B as Requester>::RevokeChatInviteLink
pub fn revoke_chat_invite_link<C, I>(
&self,
chat_id: C,
invite_link: I
) -> <Throttle<B> as Requester>::RevokeChatInviteLink where
C: Into<ChatId>,
I: Into<String>,
[src]
&self,
chat_id: C,
invite_link: I
) -> <Throttle<B> as Requester>::RevokeChatInviteLink where
C: Into<ChatId>,
I: Into<String>,
type SetChatPhoto = <B as Requester>::SetChatPhoto
pub fn set_chat_photo<C>(
&self,
chat_id: C,
photo: InputFile
) -> <Throttle<B> as Requester>::SetChatPhoto where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
photo: InputFile
) -> <Throttle<B> as Requester>::SetChatPhoto where
C: Into<ChatId>,
type DeleteChatPhoto = <B as Requester>::DeleteChatPhoto
pub fn delete_chat_photo<C>(
&self,
chat_id: C
) -> <Throttle<B> as Requester>::DeleteChatPhoto where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Throttle<B> as Requester>::DeleteChatPhoto where
C: Into<ChatId>,
type SetChatTitle = <B as Requester>::SetChatTitle
pub fn set_chat_title<C, T>(
&self,
chat_id: C,
title: T
) -> <Throttle<B> as Requester>::SetChatTitle where
C: Into<ChatId>,
T: Into<String>,
[src]
&self,
chat_id: C,
title: T
) -> <Throttle<B> as Requester>::SetChatTitle where
C: Into<ChatId>,
T: Into<String>,
type SetChatDescription = <B as Requester>::SetChatDescription
pub fn set_chat_description<C>(
&self,
chat_id: C
) -> <Throttle<B> as Requester>::SetChatDescription where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Throttle<B> as Requester>::SetChatDescription where
C: Into<ChatId>,
type PinChatMessage = <B as Requester>::PinChatMessage
pub fn pin_chat_message<C>(
&self,
chat_id: C,
message_id: i32
) -> <Throttle<B> as Requester>::PinChatMessage where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32
) -> <Throttle<B> as Requester>::PinChatMessage where
C: Into<ChatId>,
type UnpinChatMessage = <B as Requester>::UnpinChatMessage
pub fn unpin_chat_message<C>(
&self,
chat_id: C
) -> <Throttle<B> as Requester>::UnpinChatMessage where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Throttle<B> as Requester>::UnpinChatMessage where
C: Into<ChatId>,
type UnpinAllChatMessages = <B as Requester>::UnpinAllChatMessages
pub fn unpin_all_chat_messages<C>(
&self,
chat_id: C
) -> <Throttle<B> as Requester>::UnpinAllChatMessages where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Throttle<B> as Requester>::UnpinAllChatMessages where
C: Into<ChatId>,
type LeaveChat = <B as Requester>::LeaveChat
pub fn leave_chat<C>(&self, chat_id: C) -> <Throttle<B> as Requester>::LeaveChat where
C: Into<ChatId>,
[src]
C: Into<ChatId>,
type GetChat = <B as Requester>::GetChat
pub fn get_chat<C>(&self, chat_id: C) -> <Throttle<B> as Requester>::GetChat where
C: Into<ChatId>,
[src]
C: Into<ChatId>,
type GetChatAdministrators = <B as Requester>::GetChatAdministrators
pub fn get_chat_administrators<C>(
&self,
chat_id: C
) -> <Throttle<B> as Requester>::GetChatAdministrators where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Throttle<B> as Requester>::GetChatAdministrators where
C: Into<ChatId>,
type GetChatMembersCount = <B as Requester>::GetChatMembersCount
pub fn get_chat_members_count<C>(
&self,
chat_id: C
) -> <Throttle<B> as Requester>::GetChatMembersCount where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Throttle<B> as Requester>::GetChatMembersCount where
C: Into<ChatId>,
type GetChatMember = <B as Requester>::GetChatMember
pub fn get_chat_member<C>(
&self,
chat_id: C,
user_id: i64
) -> <Throttle<B> as Requester>::GetChatMember where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
user_id: i64
) -> <Throttle<B> as Requester>::GetChatMember where
C: Into<ChatId>,
type SetChatStickerSet = <B as Requester>::SetChatStickerSet
pub fn set_chat_sticker_set<C, S>(
&self,
chat_id: C,
sticker_set_name: S
) -> <Throttle<B> as Requester>::SetChatStickerSet where
C: Into<ChatId>,
S: Into<String>,
[src]
&self,
chat_id: C,
sticker_set_name: S
) -> <Throttle<B> as Requester>::SetChatStickerSet where
C: Into<ChatId>,
S: Into<String>,
type DeleteChatStickerSet = <B as Requester>::DeleteChatStickerSet
pub fn delete_chat_sticker_set<C>(
&self,
chat_id: C
) -> <Throttle<B> as Requester>::DeleteChatStickerSet where
C: Into<ChatId>,
[src]
&self,
chat_id: C
) -> <Throttle<B> as Requester>::DeleteChatStickerSet where
C: Into<ChatId>,
type AnswerCallbackQuery = <B as Requester>::AnswerCallbackQuery
pub fn answer_callback_query<C>(
&self,
callback_query_id: C
) -> <Throttle<B> as Requester>::AnswerCallbackQuery where
C: Into<String>,
[src]
&self,
callback_query_id: C
) -> <Throttle<B> as Requester>::AnswerCallbackQuery where
C: Into<String>,
type SetMyCommands = <B as Requester>::SetMyCommands
pub fn set_my_commands<C>(
&self,
commands: C
) -> <Throttle<B> as Requester>::SetMyCommands where
C: IntoIterator<Item = BotCommand>,
[src]
&self,
commands: C
) -> <Throttle<B> as Requester>::SetMyCommands where
C: IntoIterator<Item = BotCommand>,
type GetMyCommands = <B as Requester>::GetMyCommands
pub fn get_my_commands(&self) -> <Throttle<B> as Requester>::GetMyCommands
[src]
type AnswerInlineQuery = <B as Requester>::AnswerInlineQuery
pub fn answer_inline_query<I, R>(
&self,
inline_query_id: I,
results: R
) -> <Throttle<B> as Requester>::AnswerInlineQuery where
R: IntoIterator<Item = InlineQueryResult>,
I: Into<String>,
[src]
&self,
inline_query_id: I,
results: R
) -> <Throttle<B> as Requester>::AnswerInlineQuery where
R: IntoIterator<Item = InlineQueryResult>,
I: Into<String>,
type EditMessageText = <B as Requester>::EditMessageText
pub fn edit_message_text<C, T>(
&self,
chat_id: C,
message_id: i32,
text: T
) -> <Throttle<B> as Requester>::EditMessageText where
C: Into<ChatId>,
T: Into<String>,
[src]
&self,
chat_id: C,
message_id: i32,
text: T
) -> <Throttle<B> as Requester>::EditMessageText where
C: Into<ChatId>,
T: Into<String>,
type EditMessageTextInline = <B as Requester>::EditMessageTextInline
pub fn edit_message_text_inline<I, T>(
&self,
inline_message_id: I,
text: T
) -> <Throttle<B> as Requester>::EditMessageTextInline where
T: Into<String>,
I: Into<String>,
[src]
&self,
inline_message_id: I,
text: T
) -> <Throttle<B> as Requester>::EditMessageTextInline where
T: Into<String>,
I: Into<String>,
type EditMessageCaption = <B as Requester>::EditMessageCaption
pub fn edit_message_caption<C>(
&self,
chat_id: C,
message_id: i32
) -> <Throttle<B> as Requester>::EditMessageCaption where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32
) -> <Throttle<B> as Requester>::EditMessageCaption where
C: Into<ChatId>,
type EditMessageCaptionInline = <B as Requester>::EditMessageCaptionInline
pub fn edit_message_caption_inline<I>(
&self,
inline_message_id: I
) -> <Throttle<B> as Requester>::EditMessageCaptionInline where
I: Into<String>,
[src]
&self,
inline_message_id: I
) -> <Throttle<B> as Requester>::EditMessageCaptionInline where
I: Into<String>,
type EditMessageMedia = <B as Requester>::EditMessageMedia
pub fn edit_message_media<C>(
&self,
chat_id: C,
message_id: i32,
media: InputMedia
) -> <Throttle<B> as Requester>::EditMessageMedia where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32,
media: InputMedia
) -> <Throttle<B> as Requester>::EditMessageMedia where
C: Into<ChatId>,
type EditMessageMediaInline = <B as Requester>::EditMessageMediaInline
pub fn edit_message_media_inline<I>(
&self,
inline_message_id: I,
media: InputMedia
) -> <Throttle<B> as Requester>::EditMessageMediaInline where
I: Into<String>,
[src]
&self,
inline_message_id: I,
media: InputMedia
) -> <Throttle<B> as Requester>::EditMessageMediaInline where
I: Into<String>,
type EditMessageReplyMarkup = <B as Requester>::EditMessageReplyMarkup
pub fn edit_message_reply_markup<C>(
&self,
chat_id: C,
message_id: i32
) -> <Throttle<B> as Requester>::EditMessageReplyMarkup where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32
) -> <Throttle<B> as Requester>::EditMessageReplyMarkup where
C: Into<ChatId>,
type EditMessageReplyMarkupInline = <B as Requester>::EditMessageReplyMarkupInline
pub fn edit_message_reply_markup_inline<I>(
&self,
inline_message_id: I
) -> <Throttle<B> as Requester>::EditMessageReplyMarkupInline where
I: Into<String>,
[src]
&self,
inline_message_id: I
) -> <Throttle<B> as Requester>::EditMessageReplyMarkupInline where
I: Into<String>,
type StopPoll = <B as Requester>::StopPoll
pub fn stop_poll<C>(
&self,
chat_id: C,
message_id: i32
) -> <Throttle<B> as Requester>::StopPoll where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32
) -> <Throttle<B> as Requester>::StopPoll where
C: Into<ChatId>,
type DeleteMessage = <B as Requester>::DeleteMessage
pub fn delete_message<C>(
&self,
chat_id: C,
message_id: i32
) -> <Throttle<B> as Requester>::DeleteMessage where
C: Into<ChatId>,
[src]
&self,
chat_id: C,
message_id: i32
) -> <Throttle<B> as Requester>::DeleteMessage where
C: Into<ChatId>,
type GetStickerSet = <B as Requester>::GetStickerSet
pub fn get_sticker_set<N>(
&self,
name: N
) -> <Throttle<B> as Requester>::GetStickerSet where
N: Into<String>,
[src]
&self,
name: N
) -> <Throttle<B> as Requester>::GetStickerSet where
N: Into<String>,
type UploadStickerFile = <B as Requester>::UploadStickerFile
pub fn upload_sticker_file(
&self,
user_id: i64,
png_sticker: InputFile
) -> <Throttle<B> as Requester>::UploadStickerFile
[src]
&self,
user_id: i64,
png_sticker: InputFile
) -> <Throttle<B> as Requester>::UploadStickerFile
type CreateNewStickerSet = <B as Requester>::CreateNewStickerSet
pub fn create_new_sticker_set<N, T, E>(
&self,
user_id: i64,
name: N,
title: T,
sticker: InputSticker,
emojis: E
) -> <Throttle<B> 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
) -> <Throttle<B> as Requester>::CreateNewStickerSet where
T: Into<String>,
E: Into<String>,
N: Into<String>,
type AddStickerToSet = <B as Requester>::AddStickerToSet
pub fn add_sticker_to_set<N, E>(
&self,
user_id: i64,
name: N,
sticker: InputSticker,
emojis: E
) -> <Throttle<B> as Requester>::AddStickerToSet where
E: Into<String>,
N: Into<String>,
[src]
&self,
user_id: i64,
name: N,
sticker: InputSticker,
emojis: E
) -> <Throttle<B> as Requester>::AddStickerToSet where
E: Into<String>,
N: Into<String>,
type SetStickerPositionInSet = <B as Requester>::SetStickerPositionInSet
pub fn set_sticker_position_in_set<S>(
&self,
sticker: S,
position: u32
) -> <Throttle<B> as Requester>::SetStickerPositionInSet where
S: Into<String>,
[src]
&self,
sticker: S,
position: u32
) -> <Throttle<B> as Requester>::SetStickerPositionInSet where
S: Into<String>,
type DeleteStickerFromSet = <B as Requester>::DeleteStickerFromSet
pub fn delete_sticker_from_set<S>(
&self,
sticker: S
) -> <Throttle<B> as Requester>::DeleteStickerFromSet where
S: Into<String>,
[src]
&self,
sticker: S
) -> <Throttle<B> as Requester>::DeleteStickerFromSet where
S: Into<String>,
type SetStickerSetThumb = <B as Requester>::SetStickerSetThumb
pub fn set_sticker_set_thumb<N>(
&self,
name: N,
user_id: i64
) -> <Throttle<B> as Requester>::SetStickerSetThumb where
N: Into<String>,
[src]
&self,
name: N,
user_id: i64
) -> <Throttle<B> as Requester>::SetStickerSetThumb where
N: Into<String>,
type AnswerShippingQuery = <B as Requester>::AnswerShippingQuery
pub fn answer_shipping_query<S>(
&self,
shipping_query_id: S,
ok: bool
) -> <Throttle<B> as Requester>::AnswerShippingQuery where
S: Into<String>,
[src]
&self,
shipping_query_id: S,
ok: bool
) -> <Throttle<B> as Requester>::AnswerShippingQuery where
S: Into<String>,
type AnswerPreCheckoutQuery = <B as Requester>::AnswerPreCheckoutQuery
pub fn answer_pre_checkout_query<P>(
&self,
pre_checkout_query_id: P,
ok: bool
) -> <Throttle<B> as Requester>::AnswerPreCheckoutQuery where
P: Into<String>,
[src]
&self,
pre_checkout_query_id: P,
ok: bool
) -> <Throttle<B> as Requester>::AnswerPreCheckoutQuery where
P: Into<String>,
type SetPassportDataErrors = <B as Requester>::SetPassportDataErrors
pub fn set_passport_data_errors<E>(
&self,
user_id: i64,
errors: E
) -> <Throttle<B> as Requester>::SetPassportDataErrors where
E: IntoIterator<Item = PassportElementError>,
[src]
&self,
user_id: i64,
errors: E
) -> <Throttle<B> as Requester>::SetPassportDataErrors where
E: IntoIterator<Item = PassportElementError>,
type SendGame = <B as Requester>::SendGame
pub fn send_game<G>(
&self,
chat_id: u32,
game_short_name: G
) -> <Throttle<B> as Requester>::SendGame where
G: Into<String>,
[src]
&self,
chat_id: u32,
game_short_name: G
) -> <Throttle<B> as Requester>::SendGame where
G: Into<String>,
type SetGameScore = <B as Requester>::SetGameScore
pub fn set_game_score(
&self,
user_id: i64,
score: u64,
chat_id: u32,
message_id: i64
) -> <Throttle<B> as Requester>::SetGameScore
[src]
&self,
user_id: i64,
score: u64,
chat_id: u32,
message_id: i64
) -> <Throttle<B> as Requester>::SetGameScore
type SetGameScoreInline = <B as Requester>::SetGameScoreInline
pub fn set_game_score_inline<I>(
&self,
user_id: i64,
score: u64,
inline_message_id: I
) -> <Throttle<B> as Requester>::SetGameScoreInline where
I: Into<String>,
[src]
&self,
user_id: i64,
score: u64,
inline_message_id: I
) -> <Throttle<B> as Requester>::SetGameScoreInline where
I: Into<String>,
type GetGameHighScores = <B as Requester>::GetGameHighScores
pub fn get_game_high_scores<T>(
&self,
user_id: i64,
target: T
) -> <Throttle<B> as Requester>::GetGameHighScores where
T: Into<TargetMessage>,
[src]
&self,
user_id: i64,
target: T
) -> <Throttle<B> as Requester>::GetGameHighScores where
T: Into<TargetMessage>,
type GetUpdatesFaultTolerant = <B as Requester>::GetUpdatesFaultTolerant
pub fn get_updates_fault_tolerant(
&self
) -> <Throttle<B> as Requester>::GetUpdatesFaultTolerant
[src]
&self
) -> <Throttle<B> as Requester>::GetUpdatesFaultTolerant
Auto Trait Implementations
impl<B> !RefUnwindSafe for Throttle<B>
impl<B> Send for Throttle<B> where
B: Send,
B: Send,
impl<B> Sync for Throttle<B> where
B: Sync,
B: Sync,
impl<B> Unpin for Throttle<B> where
B: Unpin,
B: Unpin,
impl<B> !UnwindSafe for Throttle<B>
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> 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>,