pub struct TextQuote {
pub position: i64,
pub text: Text,
pub is_manual: Option<bool>,
}
Expand description
Contains information about the quoted part of a message that is replied to by the given message.
Fields§
§position: i64
Approximate quote position in the original message in UTF-16 code units as specified by the sender.
text: Text
Text of the quoted part of a message that is replied to by the given message.
is_manual: Option<bool>
Whether the quote was chosen manually by the message sender or was added automatically by the server.
Implementations§
source§impl TextQuote
impl TextQuote
sourcepub fn new<T>(position: i64, text: T) -> TextQuote
pub fn new<T>(position: i64, text: T) -> TextQuote
Creates a new TextQuote
.
§Arguments
position
- Approximate quote position in the original message in UTF-16 code units.text
- Text of the quoted part of a message that is replied to by the given message.
sourcepub fn with_is_manual(self, value: bool) -> TextQuote
pub fn with_is_manual(self, value: bool) -> TextQuote
Sets a new value for an is_manual
flag.
§Arguments
value
- Whether the quote was chosen manually by the message sender or was added automatically by the server.
Trait Implementations§
source§impl<'de> Deserialize<'de> for TextQuote
impl<'de> Deserialize<'de> for TextQuote
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<TextQuote, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<TextQuote, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for TextQuote
impl PartialEq for TextQuote
source§impl PartialOrd for TextQuote
impl PartialOrd for TextQuote
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 TextQuote
impl Serialize for TextQuote
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 TextQuote
Auto Trait Implementations§
impl Freeze for TextQuote
impl RefUnwindSafe for TextQuote
impl Send for TextQuote
impl Sync for TextQuote
impl Unpin for TextQuote
impl UnwindSafe for TextQuote
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