pub enum TextEntityType {
Show 18 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), 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)

A bold text

BotCommand(TextEntityTypeBotCommand)

A bot command, beginning with “/”

Cashtag(TextEntityTypeCashtag)

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

Code(TextEntityTypeCode)

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

EmailAddress(TextEntityTypeEmailAddress)

An email address

Hashtag(TextEntityTypeHashtag)

A hashtag text, beginning with “#”

Italic(TextEntityTypeItalic)

An italic text

MediaTimestamp(TextEntityTypeMediaTimestamp)

A media timestamp

Mention(TextEntityTypeMention)

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)

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

Strikethrough(TextEntityTypeStrikethrough)

A strikethrough text

TextUrl(TextEntityTypeTextUrl)

A text description shown instead of a raw URL

Underline(TextEntityTypeUnderline)

An underlined text

Url(TextEntityTypeUrl)

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.