pub enum TextEntityType {
Show 19 variants BankCardNumber(TextEntityTypeBankCardNumber), Bold(TextEntityTypeBold), BotCommand(TextEntityTypeBotCommand), Cashtag(TextEntityTypeCashtag), Code(TextEntityTypeCode), EmailAddress(TextEntityTypeEmailAddress), Hashtag(TextEntityTypeHashtag), Italic(TextEntityTypeItalic), MediaTimestamp(TextEntityTypeMediaTimestamp), Mention(TextEntityTypeMention), MentionName(TextEntityTypeMentionName), PhoneNumber(TextEntityTypePhoneNumber), Pre(TextEntityTypePre), PreCode(TextEntityTypePreCode), Spoiler(TextEntityTypeSpoiler), Strikethrough(TextEntityTypeStrikethrough), TextUrl(TextEntityTypeTextUrl), Underline(TextEntityTypeUnderline), Url(TextEntityTypeUrl), // some variants omitted
}
Expand description

Represents a part of the text which must be formatted differently

Variants

BankCardNumber(TextEntityTypeBankCardNumber)

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

Bold(TextEntityTypeBold)

Tuple Fields

A bold text

BotCommand(TextEntityTypeBotCommand)

Tuple Fields

A bot command, beginning with “/”

Cashtag(TextEntityTypeCashtag)

Tuple Fields

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

Code(TextEntityTypeCode)

Tuple Fields

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

EmailAddress(TextEntityTypeEmailAddress)

An email address

Hashtag(TextEntityTypeHashtag)

Tuple Fields

A hashtag text, beginning with “#”

Italic(TextEntityTypeItalic)

Tuple Fields

An italic text

MediaTimestamp(TextEntityTypeMediaTimestamp)

A media timestamp

Mention(TextEntityTypeMention)

Tuple Fields

A mention of a user by their username

MentionName(TextEntityTypeMentionName)

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

PhoneNumber(TextEntityTypePhoneNumber)

A phone number

Pre(TextEntityTypePre)

Tuple Fields

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

PreCode(TextEntityTypePreCode)

Tuple Fields

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

Spoiler(TextEntityTypeSpoiler)

Tuple Fields

A spoiler text. Not supported in secret chats

Strikethrough(TextEntityTypeStrikethrough)

A strikethrough text

TextUrl(TextEntityTypeTextUrl)

Tuple Fields

A text description shown instead of a raw URL

Underline(TextEntityTypeUnderline)

Tuple Fields

An underlined text

Url(TextEntityTypeUrl)

Tuple Fields

An HTTP URL

Implementations

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Return td type to json string

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

Performs the conversion.

Performs the conversion.

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.