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
A bold text
Tuple Fields of Bold
A bot command, beginning with “/”. This shouldn’t be highlighted if there are no bots in the chat
Tuple Fields of BotCommand
A cashtag text, beginning with “$” and consisting of capital english letters (i.e. “$USD”)
Tuple Fields of Cashtag
Text that must be formatted as if inside a code HTML tag
Tuple Fields of Code
An email address
Tuple Fields of EmailAddress
A hashtag text, beginning with “#”
Tuple Fields of Hashtag
An italic text
Tuple Fields of Italic
A mention of a user by their username
Tuple Fields of Mention
A text shows instead of a raw mention of the user (e.g., when the user has no username)
Tuple Fields of MentionName
A phone number
Tuple Fields of PhoneNumber
Text that must be formatted as if inside a pre HTML tag
Tuple Fields of Pre
Text that must be formatted as if inside pre, and code HTML tags
Tuple Fields of PreCode
A text description shown instead of a raw URL
Tuple Fields of TextUrl
An HTTP URL
Tuple Fields of 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