Enum rust_tdlib::types::TextEntityType
source · [−]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
sourceimpl AsRef<TextEntityType> for TextEntityType
impl AsRef<TextEntityType> for TextEntityType
sourcefn as_ref(&self) -> &TextEntityType
fn as_ref(&self) -> &TextEntityType
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Clone for TextEntityType
impl Clone for TextEntityType
sourcefn clone(&self) -> TextEntityType
fn clone(&self) -> TextEntityType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TextEntityType
impl Debug for TextEntityType
sourceimpl Default for TextEntityType
impl Default for TextEntityType
sourceimpl<'de> Deserialize<'de> for TextEntityType
impl<'de> Deserialize<'de> for TextEntityType
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for TextEntityType
impl Serialize for TextEntityType
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more