pub enum MessageEntity {
Show 19 variants
Mention(TextBlock),
HashTag(TextBlock),
CashTag(TextBlock),
BotCommand(TextBlock),
Url(TextBlock),
Email(TextBlock),
PhoneNumber(TextBlock),
Bold(TextBlock),
Italic(TextBlock),
Underline(TextBlock),
StrikeThrough(TextBlock),
Code(TextBlock),
Pre(Pre),
TextLink(TextLink),
TextMention(TextMention),
CustomEmoji(InlineCustomEmoji),
Spoiler(TextBlock),
Blockquote(TextBlock),
ExpandableBlockquote(TextBlock),
}Expand description
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
Variants§
Mention(TextBlock)
A mention (@username)
HashTag(TextBlock)
A hashtag (#hashtag)
CashTag(TextBlock)
A cashtag ($USD)
BotCommand(TextBlock)
A bot command (/start@bot_name)
Url(TextBlock)
An url (https://telegram.org)
Email(TextBlock)
An email address (do-not-reply@telegram.org)
PhoneNumber(TextBlock)
A phone number (+1-212-555-0123)
Bold(TextBlock)
Bold text
Italic(TextBlock)
Italic text
Underline(TextBlock)
Underlined text
StrikeThrough(TextBlock)
strikethrough text
Code(TextBlock)
A monowidth code string
Pre(Pre)
a monowidth code block
TextLink(TextLink)
A clickable text URL
TextMention(TextMention)
A mention of users without usernames
CustomEmoji(InlineCustomEmoji)
Inline custom emoji stickers
Spoiler(TextBlock)
A spoiler
Blockquote(TextBlock)
Blockquote
ExpandableBlockquote(TextBlock)
Expandable Blockquote
Trait Implementations§
Source§impl Clone for MessageEntity
impl Clone for MessageEntity
Source§fn clone(&self) -> MessageEntity
fn clone(&self) -> MessageEntity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MessageEntity
impl Debug for MessageEntity
Source§impl<'de> Deserialize<'de> for MessageEntity
impl<'de> Deserialize<'de> for MessageEntity
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 for MessageEntity
impl PartialEq for MessageEntity
Source§impl Serialize for MessageEntity
impl Serialize for MessageEntity
impl StructuralPartialEq for MessageEntity
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