Skip to main content

ReplyParameters

Struct ReplyParameters 

Source
pub struct ReplyParameters {
    pub message_id: Option<i64>,
    pub ephemeral_message_id: Option<i64>,
    pub chat_id: Option<ChatId>,
    pub allow_sending_without_reply: Option<bool>,
    pub quote: Option<String>,
    pub quote_parse_mode: Option<ParseMode>,
    pub quote_entities: Option<Vec<MessageEntity>>,
    pub quote_position: Option<u32>,
    pub poll_option_id: Option<String>,
    pub checklist_task_id: Option<i64>,
}
Expand description

Parameters for replying to a message.

Fields§

§message_id: Option<i64>

Identifier of the message that will be replied to in the current chat, or in the chat chat_id if specified. Required if ephemeral_message_id isn’t specified.

§ephemeral_message_id: Option<i64>

Identifier of the ephemeral message that will be replied to in the current chat. A reply to an ephemeral message must itself be an ephemeral message. Required if message_id isn’t specified.

§chat_id: Option<ChatId>

If the message to be replied to is from a different chat, the chat containing it. Not supported for messages sent on behalf of a business account, direct-messages-chat messages, or ephemeral messages.

§allow_sending_without_reply: Option<bool>

true if the message should be sent even if the specified message is not found. Always false for replies in another chat or forum topic and for sent ephemeral messages. Always true for messages sent on behalf of a business account.

§quote: Option<String>

Quoted part of the message to be replied to; 0–1024 characters after entities parsing. Must be an exact substring of the message being replied to, including any bold/italic/underline/strikethrough/spoiler/ custom_emoji/date_time entities. Ignored for ephemeral messages.

§quote_parse_mode: Option<ParseMode>

Parse mode for the quote.

§quote_entities: Option<Vec<MessageEntity>>

Special entities in the quote.

§quote_position: Option<u32>

Position of the quote in the original message (UTF-16 offset).

§poll_option_id: Option<String>

Identifier of the poll option being replied to.

§checklist_task_id: Option<i64>

Identifier of the checklist task being replied to.

Trait Implementations§

Source§

impl Clone for ReplyParameters

Source§

fn clone(&self) -> ReplyParameters

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ReplyParameters

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ReplyParameters

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ReplyParameters

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

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.