EditMessageCaption

Struct EditMessageCaption 

Source
pub struct EditMessageCaption {
    pub chat_id: ChatId,
    pub message_id: i64,
    pub caption: Option<String>,
    pub caption_entities: Option<Vec<MessageEntity>>,
    pub parse_mode: Option<ParseMode>,
    pub disable_web_page_preview: Option<bool>,
    pub reply_markup: Option<InlineKeyboardMarkup>,
}
Expand description

Use this method to edit captions of messages. On success, the edited Message is returned.

Fields§

§chat_id: ChatId

Unique identifier for the target chat or username of the target channel (in the format @channelusername)

§message_id: i64

Identifier of the message to edit

§caption: Option<String>

New caption of the message, 0-1024 characters after entities parsing

§caption_entities: Option<Vec<MessageEntity>>

For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption

§parse_mode: Option<ParseMode>

Mode for parsing entities in the message text. See formatting options for more details.

§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 EditMessageCaption

Source

pub fn new_empty(chat_id: impl Into<ChatId>, message_id: i64) -> Self

Create a new editMessageCaption request with no caption

Source

pub fn new( chat_id: impl Into<ChatId>, message_id: i64, caption: impl Into<String>, ) -> Self

Create a new editMessageCaption request with caption

Source

pub fn with_parse_mode(self, parse_mode: ParseMode) -> Self

Set parse mode

Source

pub fn with_entities(self, entities: Vec<MessageEntity>) -> Self

Set caption entities

Source

pub fn with_entity(self, entity: MessageEntity) -> Self

Add one entity

Source

pub fn disable_web_page_preview(self) -> Self

Disable web preview

Source

pub fn with_reply_markup(self, markup: impl Into<InlineKeyboardMarkup>) -> Self

Set reply markup

Trait Implementations§

Source§

impl Clone for EditMessageCaption

Source§

fn clone(&self) -> EditMessageCaption

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Serialize for EditMessageCaption

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TelegramMethod for EditMessageCaption

Source§

type Response = Message

Source§

fn name() -> &'static str

Source§

impl JsonMethod for EditMessageCaption

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.