pub struct ReplyParameters {
pub message_id: 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>,
}Expand description
Describes reply parameters for the message that is being sent.
Fields§
§message_id: MessageIdIdentifier of the message that will be replied to in the current chat, or in the chat chat_id if it is 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
Implementations§
Source§impl ReplyParameters
impl ReplyParameters
pub fn new(message_id: MessageId) -> ReplyParameters
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
Trait Implementations§
Source§impl Clone for ReplyParameters
impl Clone for ReplyParameters
Source§fn clone(&self) -> ReplyParameters
fn clone(&self) -> ReplyParameters
1.0.0 · 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>,
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 Eq for ReplyParameters
impl StructuralPartialEq for ReplyParameters
Auto Trait Implementations§
impl Freeze for ReplyParameters
impl RefUnwindSafe for ReplyParameters
impl Send for ReplyParameters
impl Sync for ReplyParameters
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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