pub struct TextQuote {
pub text: String,
pub entities: Vec<MessageEntity>,
pub rich_texts: Option<Vec<RichText>>,
pub position: u32,
pub is_manual: bool,
}Expand description
This object contains information about the quoted part of a message that is replied to by the given message.
Fields§
§text: StringText of the quoted part of a message that is replied to by the given message
entities: Vec<MessageEntity>Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.
rich_texts: Option<Vec<RichText>>Rich text of the quote, if it was chosen from a rich message.
position: u32Approximate quote position in the original message in UTF-16 code units as specified by the sender
is_manual: boolTrue, if the quote was chosen manually by the message sender. Otherwise, the quote 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 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 Forget for TextQuote
impl Freeze for TextQuotewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<MessageEntity>: Freeze,
PhantomData<RichText>: Freeze,
impl Move for TextQuote
impl RefUnwindSafe for TextQuote
impl Send for TextQuote
impl Sync for TextQuote
impl Unpin for TextQuote
impl UnsafeUnpin for TextQuotewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<MessageEntity>: UnsafeUnpin,
PhantomData<RichText>: UnsafeUnpin,
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
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<T> Erasable for T
impl<T> Erasable for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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