pub enum TextEntityType {
Show 19 variants Mention, Hashtag, Cashtag, BotCommand, Url, EmailAddress, PhoneNumber, BankCardNumber, Bold, Italic, Underline, Strikethrough, Spoiler, Code, Pre, PreCode(TextEntityTypePreCode), TextUrl(TextEntityTypeTextUrl), MentionName(TextEntityTypeMentionName), MediaTimestamp(TextEntityTypeMediaTimestamp),
}

Variants

Mention

A mention of a user by their username

Hashtag

A hashtag text, beginning with “#”

Cashtag

A cashtag text, beginning with “$” and consisting of capital English letters (e.g., “$USD”)

BotCommand

A bot command, beginning with “/”

Url

An HTTP URL

EmailAddress

An email address

PhoneNumber

A phone number

BankCardNumber

A bank card number. The getBankCardInfo method can be used to get information about the bank card

Bold

A bold text

Italic

An italic text

Underline

An underlined text

Strikethrough

A strikethrough text

Spoiler

A spoiler text. Not supported in secret chats

Code

Text that must be formatted as if inside a code HTML tag

Pre

Text that must be formatted as if inside a pre HTML tag

PreCode(TextEntityTypePreCode)

Text that must be formatted as if inside pre, and code HTML tags

TextUrl(TextEntityTypeTextUrl)

A text description shown instead of a raw URL

MentionName(TextEntityTypeMentionName)

A text shows instead of a raw mention of the user (e.g., when the user has no username)

MediaTimestamp(TextEntityTypeMediaTimestamp)

A media timestamp

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.