pub trait EditMessageTextInlineSetters: Sized + HasPayload<Payload = EditMessageTextInline> {
// Provided methods
fn inline_message_id<T>(self, value: T) -> Self
where T: Into<String> { ... }
fn text<T>(self, value: T) -> Self
where T: Into<String> { ... }
fn rich_message(self, value: InputRichMessage) -> Self { ... }
fn business_connection_id(self, value: BusinessConnectionId) -> Self { ... }
fn parse_mode(self, value: ParseMode) -> Self { ... }
fn entities<T>(self, value: T) -> Self
where T: IntoIterator<Item = <Vec<MessageEntity> as IntoIterator>::Item> { ... }
fn disable_web_page_preview(self, value: bool) -> Self { ... }
fn reply_markup(self, value: InlineKeyboardMarkup) -> Self { ... }
}Expand description
Setters for fields of EditMessageTextInline
Provided Methods§
Sourcefn inline_message_id<T>(self, value: T) -> Self
fn inline_message_id<T>(self, value: T) -> Self
Setter for inline_message_id field.
Sourcefn text<T>(self, value: T) -> Self
fn text<T>(self, value: T) -> Self
Setter for text field.
Examples found in repository?
examples/buttons.rs (line 126)
113async fn callback_handler(bot: Bot, q: CallbackQuery) -> Result<(), Box<dyn Error + Send + Sync>> {
114 if let Some(ref version) = q.data {
115 let text = format!("You chose: {version}");
116
117 // Tell telegram that we've seen this query, to remove 🕑 icons from the
118 // clients. You could also use `answer_callback_query`'s optional
119 // parameters to tweak what happens on the client side.
120 bot.answer_callback_query(q.id.clone()).await?;
121
122 // Edit text of the message to which the buttons were attached
123 if let Some(message) = q.regular_message() {
124 bot.edit_text(message, text).await?;
125 } else if let Some(id) = q.inline_message_id {
126 bot.edit_message_text_inline(id).text(text).await?;
127 }
128
129 log::info!("You chose: {version}");
130 }
131
132 Ok(())
133}Sourcefn rich_message(self, value: InputRichMessage) -> Self
fn rich_message(self, value: InputRichMessage) -> Self
Setter for rich_message field.
Sourcefn business_connection_id(self, value: BusinessConnectionId) -> Self
fn business_connection_id(self, value: BusinessConnectionId) -> Self
Setter for business_connection_id field.
Sourcefn parse_mode(self, value: ParseMode) -> Self
fn parse_mode(self, value: ParseMode) -> Self
Setter for parse_mode field.
Sourcefn disable_web_page_preview(self, value: bool) -> Self
fn disable_web_page_preview(self, value: bool) -> Self
Setter for disable_web_page_preview field.
Sourcefn reply_markup(self, value: InlineKeyboardMarkup) -> Self
fn reply_markup(self, value: InlineKeyboardMarkup) -> Self
Setter for reply_markup field.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".