Struct telegram_bot_raw_ars::types::message::RawMessageEntity
source · pub struct RawMessageEntity {
pub type_: String,
pub offset: Integer,
pub length: Integer,
pub url: Option<String>,
pub user: Option<User>,
}
Expand description
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. Directly mapped.
Fields§
§type_: String
Type of the entity. Can be mention (@username), hashtag, bot_command, url, email, bold (bold text), italic (italic text), code (monowidth string), pre (monowidth block), text_link (for clickable text URLs), text_mention (for users without usernames).
offset: Integer
Offset in UTF-16 code units to the start of the entity.
length: Integer
Length of the entity in UTF-16 code units.
url: Option<String>
For “text_link” only, url that will be opened after user taps on the text.
user: Option<User>
For “text_mention” only, the mentioned user.
Trait Implementations§
source§impl Clone for RawMessageEntity
impl Clone for RawMessageEntity
source§fn clone(&self) -> RawMessageEntity
fn clone(&self) -> RawMessageEntity
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 RawMessageEntity
impl Debug for RawMessageEntity
source§impl<'de> Deserialize<'de> for RawMessageEntity
impl<'de> Deserialize<'de> for RawMessageEntity
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<RawMessageEntity> for RawMessageEntity
impl PartialEq<RawMessageEntity> for RawMessageEntity
source§fn eq(&self, other: &RawMessageEntity) -> bool
fn eq(&self, other: &RawMessageEntity) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<RawMessageEntity> for RawMessageEntity
impl PartialOrd<RawMessageEntity> for RawMessageEntity
source§fn partial_cmp(&self, other: &RawMessageEntity) -> Option<Ordering>
fn partial_cmp(&self, other: &RawMessageEntity) -> 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 more