Enum rtdlib::types::TextEntityType
source[−]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)
Tuple Fields
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)
Tuple Fields
An email address
Hashtag(TextEntityTypeHashtag)
Tuple Fields
A hashtag text, beginning with “#”
Italic(TextEntityTypeItalic)
Tuple Fields
An italic text
MediaTimestamp(TextEntityTypeMediaTimestamp)
Tuple Fields
A media timestamp
Mention(TextEntityTypeMention)
Tuple Fields
A mention of a user by their username
MentionName(TextEntityTypeMentionName)
Tuple Fields
A text shows instead of a raw mention of the user (e.g., when the user has no username)
PhoneNumber(TextEntityTypePhoneNumber)
Tuple Fields
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)
Tuple Fields
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.
fn deserialize<D>(deserializer: D) -> Result<TextEntityType, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<TextEntityType, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for TextEntityType
impl Send for TextEntityType
impl Sync for TextEntityType
impl Unpin for TextEntityType
impl UnwindSafe for TextEntityType
Blanket Implementations
Mutably borrows from an owned value. Read more