Struct carapax::types::ReplyQuote
source · pub struct ReplyQuote { /* private fields */ }
Expand description
Quoted part of the message to be replied to.
The text must contain 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.
Implementations§
source§impl ReplyQuote
impl ReplyQuote
sourcepub fn new<T>(position: i64, text: T) -> ReplyQuote
pub fn new<T>(position: i64, text: T) -> ReplyQuote
Creates a new ReplyQuote
.
§Arguments
position
- Position of the quote in the original message in UTF-16 code units.text
- Quoted part of the message to be replied to.
sourcepub fn with_entities<T>(self, value: T) -> ReplyQuotewhere
T: IntoIterator<Item = TextEntity>,
pub fn with_entities<T>(self, value: T) -> ReplyQuotewhere
T: IntoIterator<Item = TextEntity>,
Sets a new list of entities.
§Arguments
value
- A list of special entities that appear in the quote.
It can be specified instead of parse mode.
sourcepub fn with_parse_mode(self, value: ParseMode) -> ReplyQuote
pub fn with_parse_mode(self, value: ParseMode) -> ReplyQuote
Sets a new parse mode.
§Arguments
value
- Mode for parsing entities in the quote.
It can be specified instead of entities.
Trait Implementations§
source§impl Clone for ReplyQuote
impl Clone for ReplyQuote
source§fn clone(&self) -> ReplyQuote
fn clone(&self) -> ReplyQuote
Returns a copy 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 Debug for ReplyQuote
impl Debug for ReplyQuote
source§impl<'de> Deserialize<'de> for ReplyQuote
impl<'de> Deserialize<'de> for ReplyQuote
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ReplyQuote, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ReplyQuote, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for ReplyQuote
impl PartialEq for ReplyQuote
source§fn eq(&self, other: &ReplyQuote) -> bool
fn eq(&self, other: &ReplyQuote) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ReplyQuote
impl PartialOrd for ReplyQuote
source§fn partial_cmp(&self, other: &ReplyQuote) -> Option<Ordering>
fn partial_cmp(&self, other: &ReplyQuote) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ReplyQuote
impl Serialize for ReplyQuote
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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ReplyQuote
Auto Trait Implementations§
impl Freeze for ReplyQuote
impl RefUnwindSafe for ReplyQuote
impl Send for ReplyQuote
impl Sync for ReplyQuote
impl Unpin for ReplyQuote
impl UnwindSafe for ReplyQuote
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
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>
Converts
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>
Converts
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