Struct tg_bot_models::MessageEntity
[−]
[src]
pub struct MessageEntity { pub ty: String, pub offset: i64, pub length: i64, pub url: Option<String>, pub user: Option<User>, }
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
Fields
ty: 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: i64
Offset in UTF-16 code units to the start of the entity
length: i64
Length of the entity in UTF-16 code units
url: Option<String>
Optional. For “text_link” only, url that will be opened after user taps on the text
user: Option<User>
Optional. For “text_mention” only, the mentioned user
Trait Implementations
impl Debug for MessageEntity
[src]
impl Clone for MessageEntity
[src]
fn clone(&self) -> MessageEntity
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for MessageEntity
[src]
fn eq(&self, __arg_0: &MessageEntity) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &MessageEntity) -> bool
[src]
This method tests for !=
.
impl PartialOrd for MessageEntity
[src]
fn partial_cmp(&self, __arg_0: &MessageEntity) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &MessageEntity) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &MessageEntity) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &MessageEntity) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &MessageEntity) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more