pub struct MessageEntity {
pub _type: String,
pub _offset: i32,
pub _length: i32,
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.
Fields§
§_type: StringType 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: i32Offset in UTF-16 code units to the start of the entity
_length: i32Length 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
Auto Trait Implementations§
impl Freeze for MessageEntity
impl RefUnwindSafe for MessageEntity
impl Send for MessageEntity
impl Sync for MessageEntity
impl Unpin for MessageEntity
impl UnsafeUnpin for MessageEntity
impl UnwindSafe for MessageEntity
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