pub struct EditMessageText {
pub chat_id: ChatId,
pub message_id: i64,
pub text: String,
pub parse_mode: Option<ParseMode>,
pub entities: Option<Vec<MessageEntity>>,
pub disable_web_page_preview: Option<bool>,
pub reply_markup: Option<InlineKeyboardMarkup>,
}Expand description
Fields§
§chat_id: ChatIdUnique identifier for the target chat or username of the target channel (in the format @channelusername)
message_id: i64Identifier of the message to edit
text: StringNew text of the message, 1-4096 characters after entities parsing
parse_mode: Option<ParseMode>Mode for parsing entities in the message text. See formatting options for more details.
entities: Option<Vec<MessageEntity>>List of special entities that appear in message text, which can be specified instead of parse_mode
disable_web_page_preview: Option<bool>Disables link previews for links in the sent message
reply_markup: Option<InlineKeyboardMarkup>A JSON-serialized object for a new inline keyboard.
Implementations§
Source§impl EditMessageText
impl EditMessageText
Sourcepub fn new(
chat_id: impl Into<ChatId>,
message_id: i64,
text: impl Into<String>,
) -> Self
pub fn new( chat_id: impl Into<ChatId>, message_id: i64, text: impl Into<String>, ) -> Self
Create a new editMessageText request
Sourcepub fn with_parse_mode(self, parse_mode: ParseMode) -> Self
pub fn with_parse_mode(self, parse_mode: ParseMode) -> Self
Set parse mode
Sourcepub fn with_entities(self, entities: Vec<MessageEntity>) -> Self
pub fn with_entities(self, entities: Vec<MessageEntity>) -> Self
Set entities
Sourcepub fn with_entity(self, entity: MessageEntity) -> Self
pub fn with_entity(self, entity: MessageEntity) -> Self
Add one entity
Sourcepub fn disable_web_page_preview(self) -> Self
pub fn disable_web_page_preview(self) -> Self
Disable web preview
Sourcepub fn with_reply_markup(self, markup: impl Into<InlineKeyboardMarkup>) -> Self
pub fn with_reply_markup(self, markup: impl Into<InlineKeyboardMarkup>) -> Self
Set reply markup
Trait Implementations§
Source§impl Clone for EditMessageText
impl Clone for EditMessageText
Source§fn clone(&self) -> EditMessageText
fn clone(&self) -> EditMessageText
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Serialize for EditMessageText
impl Serialize for EditMessageText
Source§impl TelegramMethod for EditMessageText
impl TelegramMethod for EditMessageText
impl JsonMethod for EditMessageText
Auto Trait Implementations§
impl Freeze for EditMessageText
impl RefUnwindSafe for EditMessageText
impl Send for EditMessageText
impl Sync for EditMessageText
impl Unpin for EditMessageText
impl UnwindSafe for EditMessageText
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
Mutably borrows from an owned value. Read more