pub enum MessageEntityKind {
Show 17 variants Mention, Hashtag, Cashtag, BotCommand, Url, Email, PhoneNumber, Bold, Italic, Underline, Strikethrough, Spoiler, Code, Pre { language: String, }, TextLink { url: String, }, TextMention { user: User, }, CustomEmoji { custom_emoji_id: String, },
}
Expand description

This object represents the kind of message entity, and its metadata.

Variants

Mention

@username

Hashtag

#hashtag

Cashtag

$USD

BotCommand

/start@jobs_bot

Url

https://telegram.org

Email

do-not-reply@telegram.org

PhoneNumber

+1-212-555-0123

Bold

bold text

Italic

italic text

Underline

underline

Strikethrough

strikethrough text

Spoiler

spoiler message that can be revealed with click

Code

monowidth string

Pre

Fields

language: String

For “pre” only, the programming language of the entity text

monowidth block

Fields

url: String

For “text_link” only, URL that will be opened after user taps on the text

for clickable text URLs

TextMention

Fields

user: User

For “text_mention” only, the mentioned user

CustomEmoji

Fields

custom_emoji_id: String

For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker

for inline custom emoji stickers

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.