Enum rtdlib::types::TextEntityType[][src]

pub enum TextEntityType {
Show 14 variants Bold(TextEntityTypeBold), BotCommand(TextEntityTypeBotCommand), Cashtag(TextEntityTypeCashtag), Code(TextEntityTypeCode), EmailAddress(TextEntityTypeEmailAddress), Hashtag(TextEntityTypeHashtag), Italic(TextEntityTypeItalic), Mention(TextEntityTypeMention), MentionName(TextEntityTypeMentionName), PhoneNumber(TextEntityTypePhoneNumber), Pre(TextEntityTypePre), PreCode(TextEntityTypePreCode), TextUrl(TextEntityTypeTextUrl), Url(TextEntityTypeUrl), // some variants omitted
}
Expand description

Represents a part of the text which must be formatted differently

Variants

Bold

A bold text

Tuple Fields of Bold

0: TextEntityTypeBold
BotCommand

A bot command, beginning with “/”. This shouldn’t be highlighted if there are no bots in the chat

Tuple Fields of BotCommand

0: TextEntityTypeBotCommand
Cashtag

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

Tuple Fields of Cashtag

0: TextEntityTypeCashtag
Code

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

Tuple Fields of Code

0: TextEntityTypeCode
EmailAddress

An email address

Tuple Fields of EmailAddress

0: TextEntityTypeEmailAddress
Hashtag

A hashtag text, beginning with “#”

Tuple Fields of Hashtag

0: TextEntityTypeHashtag
Italic

An italic text

Tuple Fields of Italic

0: TextEntityTypeItalic
Mention

A mention of a user by their username

Tuple Fields of Mention

0: TextEntityTypeMention
MentionName

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

Tuple Fields of MentionName

0: TextEntityTypeMentionName
PhoneNumber

A phone number

Tuple Fields of PhoneNumber

0: TextEntityTypePhoneNumber
Pre

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

Tuple Fields of Pre

0: TextEntityTypePre
PreCode

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

Tuple Fields of PreCode

0: TextEntityTypePreCode
TextUrl

A text description shown instead of a raw URL

Tuple Fields of TextUrl

0: TextEntityTypeTextUrl
Url

An HTTP URL

Tuple Fields of Url

0: TextEntityTypeUrl

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)

recently added

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.