pub trait BotMessagesExt: Requester {
Show 14 methods
// Required methods
fn forward<C>(
&self,
to_chat_id: C,
message: &Message,
) -> Self::ForwardMessage
where C: Into<Recipient>;
fn edit_live_location(
&self,
message: &Message,
latitude: f64,
longitude: f64,
) -> Self::EditMessageLiveLocation;
fn stop_live_location(
&self,
message: &Message,
) -> Self::StopMessageLiveLocation;
fn set_reaction(&self, message: &Message) -> Self::SetMessageReaction;
fn pin(&self, message: &Message) -> Self::PinChatMessage;
fn unpin(&self, message: &Message) -> Self::UnpinChatMessage;
fn edit_text<T>(&self, message: &Message, text: T) -> Self::EditMessageText
where T: Into<String>;
fn edit_caption(&self, message: &Message) -> Self::EditMessageCaption;
fn edit_media(
&self,
message: &Message,
media: InputMedia,
) -> Self::EditMessageMedia;
fn edit_reply_markup(
&self,
message: &Message,
) -> Self::EditMessageReplyMarkup;
fn stop_poll_message(&self, message: &Message) -> Self::StopPoll;
fn delete(&self, message: &Message) -> Self::DeleteMessage;
fn copy<C>(&self, to_chat_id: C, message: &Message) -> Self::CopyMessage
where C: Into<Recipient>;
fn iter_star_transactions(
&self,
) -> impl Stream<Item = Result<StarTransaction, Self::Err>>;
}Expand description
Syntax sugar for Message manipulations.
Required Methods§
Sourcefn forward<C>(&self, to_chat_id: C, message: &Message) -> Self::ForwardMessage
fn forward<C>(&self, to_chat_id: C, message: &Message) -> Self::ForwardMessage
This function is the same as Bot::forward_message,
but can take in Message to forward it.
Sourcefn edit_live_location(
&self,
message: &Message,
latitude: f64,
longitude: f64,
) -> Self::EditMessageLiveLocation
fn edit_live_location( &self, message: &Message, latitude: f64, longitude: f64, ) -> Self::EditMessageLiveLocation
This function is the same as Bot::edit_message_live_location,
but can take in Message to edit it.
Sourcefn stop_live_location(&self, message: &Message) -> Self::StopMessageLiveLocation
fn stop_live_location(&self, message: &Message) -> Self::StopMessageLiveLocation
This function is the same as Bot::stop_message_live_location,
but can take in Message to stop the live location in it.
Sourcefn set_reaction(&self, message: &Message) -> Self::SetMessageReaction
fn set_reaction(&self, message: &Message) -> Self::SetMessageReaction
This function is the same as Bot::set_message_reaction,
but can take in Message to set a reaction on it.
Sourcefn pin(&self, message: &Message) -> Self::PinChatMessage
fn pin(&self, message: &Message) -> Self::PinChatMessage
This function is the same as Bot::pin_chat_message,
but can take in Message to pin it.
Sourcefn unpin(&self, message: &Message) -> Self::UnpinChatMessage
fn unpin(&self, message: &Message) -> Self::UnpinChatMessage
This function is the same as Bot::unpin_chat_message,
but can take in Message to unpin it.
Sourcefn edit_text<T>(&self, message: &Message, text: T) -> Self::EditMessageText
fn edit_text<T>(&self, message: &Message, text: T) -> Self::EditMessageText
This function is the same as Bot::edit_message_text,
but can take in Message to edit it.
Sourcefn edit_caption(&self, message: &Message) -> Self::EditMessageCaption
fn edit_caption(&self, message: &Message) -> Self::EditMessageCaption
This function is the same as Bot::edit_message_caption,
but can take in Message to edit it.
Sourcefn edit_media(
&self,
message: &Message,
media: InputMedia,
) -> Self::EditMessageMedia
fn edit_media( &self, message: &Message, media: InputMedia, ) -> Self::EditMessageMedia
This function is the same as Bot::edit_message_media,
but can take in Message to edit it.
Sourcefn edit_reply_markup(&self, message: &Message) -> Self::EditMessageReplyMarkup
fn edit_reply_markup(&self, message: &Message) -> Self::EditMessageReplyMarkup
This function is the same as Bot::edit_message_reply_markup,
but can take in Message to edit it.
Sourcefn stop_poll_message(&self, message: &Message) -> Self::StopPoll
fn stop_poll_message(&self, message: &Message) -> Self::StopPoll
This function is the same as Bot::stop_poll,
but can take in Message to stop the poll in it.
Sourcefn delete(&self, message: &Message) -> Self::DeleteMessage
fn delete(&self, message: &Message) -> Self::DeleteMessage
This function is the same as Bot::delete_message,
but can take in Message to delete it.
Sourcefn copy<C>(&self, to_chat_id: C, message: &Message) -> Self::CopyMessage
fn copy<C>(&self, to_chat_id: C, message: &Message) -> Self::CopyMessage
This function is the same as Bot::copy_message,
but can take in Message to copy it.
Sourcefn iter_star_transactions(
&self,
) -> impl Stream<Item = Result<StarTransaction, Self::Err>>
fn iter_star_transactions( &self, ) -> impl Stream<Item = Result<StarTransaction, Self::Err>>
Streams transactions in chronological order. Stops at an empty page or after yielding the first request error.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".