pub struct ReplyParameters {
pub message_id: Option<MessageId>,
pub ephemeral_message_id: Option<MessageId>,
pub chat_id: Option<Recipient>,
pub allow_sending_without_reply: Option<bool>,
pub quote: Option<String>,
pub quote_parse_mode: Option<String>,
pub quote_entities: Option<Vec<MessageEntity>>,
pub quote_position: Option<u32>,
pub checklist_task_id: Option<ChecklistTaskId>,
pub poll_option_id: Option<String>,
}Expand description
Describes reply parameters for the message that is being sent.
Fields§
§message_id: Option<MessageId>Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified. Required if ephemeral_message_id isn’t specified.
ephemeral_message_id: Option<MessageId>Identifier of the incoming ephemeral message that will be replied to in the current chat. Required if message_id isn’t specified.
chat_id: Option<Recipient>If the message to be replied to is from a different chat, unique
identifier for the chat or username of the channel (in the format
@channelusername). Not supported for messages sent on behalf of a
business account.
allow_sending_without_reply: Option<bool>Pass true if the message should be sent even if the specified message
to be replied to is not found; can be used only for replies in the
same chat and forum topic. Always false for replies in another chat or
forum topic. 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. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn’t found in the original message.
quote_parse_mode: Option<String>Mode for parsing entities in the quote. See formatting options for more details.
quote_entities: Option<Vec<MessageEntity>>A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode.
quote_position: Option<u32>Position of the quote in the original message in UTF-16 code units
checklist_task_id: Option<ChecklistTaskId>Identifier of the specific checklist task to be replied to
poll_option_id: Option<String>Persistent identifier of the specific poll option to be replied to
Implementations§
Source§impl ReplyParameters
impl ReplyParameters
pub fn new(message_id: MessageId) -> ReplyParameters
pub fn ephemeral(ephemeral_message_id: MessageId) -> ReplyParameters
Sourcepub fn ephemeral_message_id(
self,
ephemeral_message_id: MessageId,
) -> ReplyParameters
pub fn ephemeral_message_id( self, ephemeral_message_id: MessageId, ) -> ReplyParameters
Setter for the ephemeral_message_id field
Sourcepub fn chat_id(self, chat_id: Recipient) -> ReplyParameters
pub fn chat_id(self, chat_id: Recipient) -> ReplyParameters
Setter for the chat_id field
Sourcepub fn allow_sending_without_reply(self) -> ReplyParameters
pub fn allow_sending_without_reply(self) -> ReplyParameters
Sets the allow_sending_without_reply_field to true
Sourcepub fn quote(self, quote: String) -> ReplyParameters
pub fn quote(self, quote: String) -> ReplyParameters
Setter for the quote field
Sourcepub fn checklist_task_id(
self,
checklist_task_id: ChecklistTaskId,
) -> ReplyParameters
pub fn checklist_task_id( self, checklist_task_id: ChecklistTaskId, ) -> ReplyParameters
Setter for the checklist_task_id field
Sourcepub fn poll_option_id<T>(self, poll_option_id: T) -> ReplyParameters
pub fn poll_option_id<T>(self, poll_option_id: T) -> ReplyParameters
Setter for the poll_option_id field
Trait Implementations§
Source§impl Clone for ReplyParameters
impl Clone for ReplyParameters
Source§fn clone(&self) -> ReplyParameters
fn clone(&self) -> ReplyParameters
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReplyParameters
impl Debug for ReplyParameters
Source§impl Default for ReplyParameters
impl Default for ReplyParameters
Source§fn default() -> ReplyParameters
fn default() -> ReplyParameters
Source§impl<'de> Deserialize<'de> for ReplyParameters
impl<'de> Deserialize<'de> for ReplyParameters
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ReplyParameters, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ReplyParameters, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ReplyParameters
Source§impl Hash for ReplyParameters
impl Hash for ReplyParameters
Source§impl PartialEq for ReplyParameters
impl PartialEq for ReplyParameters
Source§impl Serialize for ReplyParameters
impl Serialize for ReplyParameters
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ReplyParameters
Auto Trait Implementations§
impl Forget for ReplyParameters
impl Freeze for ReplyParameters
impl RefUnwindSafe for ReplyParameters
impl Send for ReplyParameters
impl Sync for ReplyParameters
impl Unpin for ReplyParameters
impl UnsafeUnpin for ReplyParameters
impl UnwindSafe for ReplyParameters
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more