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

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

Represents a part of the text which must be formatted differently

Variants

A bank card number. The getBankCardInfo method can be used to get information about the bank card

A bold text

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

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

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

An email address

A hashtag text, beginning with "#"

An italic text

A mention of a user by their username

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

A phone number

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

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

A strikethrough text

A text description shown instead of a raw URL

An underlined text

An HTTP URL

Implementations

impl TextEntityType[src]

pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>[src]

pub fn is_bank_card_number(&self) -> bool[src]

pub fn is_bold(&self) -> bool[src]

pub fn is_bot_command(&self) -> bool[src]

pub fn is_cashtag(&self) -> bool[src]

pub fn is_code(&self) -> bool[src]

pub fn is_email_address(&self) -> bool[src]

pub fn is_hashtag(&self) -> bool[src]

pub fn is_italic(&self) -> bool[src]

pub fn is_mention(&self) -> bool[src]

pub fn is_mention_name(&self) -> bool[src]

pub fn is_phone_number(&self) -> bool[src]

pub fn is_pre(&self) -> bool[src]

pub fn is_pre_code(&self) -> bool[src]

pub fn is_strikethrough(&self) -> bool[src]

pub fn is_text_url(&self) -> bool[src]

pub fn is_underline(&self) -> bool[src]

pub fn is_url(&self) -> bool[src]

pub fn on_bank_card_number<F: FnOnce(&TextEntityTypeBankCardNumber)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_bold<F: FnOnce(&TextEntityTypeBold)>(&self, fnc: F) -> &Self[src]

pub fn on_bot_command<F: FnOnce(&TextEntityTypeBotCommand)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_cashtag<F: FnOnce(&TextEntityTypeCashtag)>(&self, fnc: F) -> &Self[src]

pub fn on_code<F: FnOnce(&TextEntityTypeCode)>(&self, fnc: F) -> &Self[src]

pub fn on_email_address<F: FnOnce(&TextEntityTypeEmailAddress)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_hashtag<F: FnOnce(&TextEntityTypeHashtag)>(&self, fnc: F) -> &Self[src]

pub fn on_italic<F: FnOnce(&TextEntityTypeItalic)>(&self, fnc: F) -> &Self[src]

pub fn on_mention<F: FnOnce(&TextEntityTypeMention)>(&self, fnc: F) -> &Self[src]

pub fn on_mention_name<F: FnOnce(&TextEntityTypeMentionName)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_phone_number<F: FnOnce(&TextEntityTypePhoneNumber)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_pre<F: FnOnce(&TextEntityTypePre)>(&self, fnc: F) -> &Self[src]

pub fn on_pre_code<F: FnOnce(&TextEntityTypePreCode)>(&self, fnc: F) -> &Self[src]

pub fn on_strikethrough<F: FnOnce(&TextEntityTypeStrikethrough)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_text_url<F: FnOnce(&TextEntityTypeTextUrl)>(&self, fnc: F) -> &Self[src]

pub fn on_underline<F: FnOnce(&TextEntityTypeUnderline)>(&self, fnc: F) -> &Self[src]

pub fn on_url<F: FnOnce(&TextEntityTypeUrl)>(&self, fnc: F) -> &Self[src]

pub fn as_bank_card_number(&self) -> Option<&TextEntityTypeBankCardNumber>[src]

pub fn as_bold(&self) -> Option<&TextEntityTypeBold>[src]

pub fn as_bot_command(&self) -> Option<&TextEntityTypeBotCommand>[src]

pub fn as_cashtag(&self) -> Option<&TextEntityTypeCashtag>[src]

pub fn as_code(&self) -> Option<&TextEntityTypeCode>[src]

pub fn as_email_address(&self) -> Option<&TextEntityTypeEmailAddress>[src]

pub fn as_hashtag(&self) -> Option<&TextEntityTypeHashtag>[src]

pub fn as_italic(&self) -> Option<&TextEntityTypeItalic>[src]

pub fn as_mention(&self) -> Option<&TextEntityTypeMention>[src]

pub fn as_mention_name(&self) -> Option<&TextEntityTypeMentionName>[src]

pub fn as_phone_number(&self) -> Option<&TextEntityTypePhoneNumber>[src]

pub fn as_pre(&self) -> Option<&TextEntityTypePre>[src]

pub fn as_pre_code(&self) -> Option<&TextEntityTypePreCode>[src]

pub fn as_strikethrough(&self) -> Option<&TextEntityTypeStrikethrough>[src]

pub fn as_text_url(&self) -> Option<&TextEntityTypeTextUrl>[src]

pub fn as_underline(&self) -> Option<&TextEntityTypeUnderline>[src]

pub fn as_url(&self) -> Option<&TextEntityTypeUrl>[src]

pub fn bank_card_number<T: AsRef<TextEntityTypeBankCardNumber>>(t: T) -> Self[src]

pub fn bold<T: AsRef<TextEntityTypeBold>>(t: T) -> Self[src]

pub fn bot_command<T: AsRef<TextEntityTypeBotCommand>>(t: T) -> Self[src]

pub fn cashtag<T: AsRef<TextEntityTypeCashtag>>(t: T) -> Self[src]

pub fn code<T: AsRef<TextEntityTypeCode>>(t: T) -> Self[src]

pub fn email_address<T: AsRef<TextEntityTypeEmailAddress>>(t: T) -> Self[src]

pub fn hashtag<T: AsRef<TextEntityTypeHashtag>>(t: T) -> Self[src]

pub fn italic<T: AsRef<TextEntityTypeItalic>>(t: T) -> Self[src]

pub fn mention<T: AsRef<TextEntityTypeMention>>(t: T) -> Self[src]

pub fn mention_name<T: AsRef<TextEntityTypeMentionName>>(t: T) -> Self[src]

pub fn phone_number<T: AsRef<TextEntityTypePhoneNumber>>(t: T) -> Self[src]

pub fn pre<T: AsRef<TextEntityTypePre>>(t: T) -> Self[src]

pub fn pre_code<T: AsRef<TextEntityTypePreCode>>(t: T) -> Self[src]

pub fn strikethrough<T: AsRef<TextEntityTypeStrikethrough>>(t: T) -> Self[src]

pub fn text_url<T: AsRef<TextEntityTypeTextUrl>>(t: T) -> Self[src]

pub fn underline<T: AsRef<TextEntityTypeUnderline>>(t: T) -> Self[src]

pub fn url<T: AsRef<TextEntityTypeUrl>>(t: T) -> Self[src]

Trait Implementations

impl AsRef<TextEntityType> for TextEntityType[src]

impl Clone for TextEntityType[src]

impl Debug for TextEntityType[src]

impl Default for TextEntityType[src]

impl<'de> Deserialize<'de> for TextEntityType[src]

impl RObject for TextEntityType[src]

impl Serialize for TextEntityType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.