Enum telexide::model::MessageEntity
source · pub enum MessageEntity {
Show 17 variants
Mention(TextBlock),
HashTag(TextBlock),
CashTag(TextBlock),
BotCommand(TextBlock),
Url(TextBlock),
Email(TextBlock),
PhoneNumber(TextBlock),
Bold(TextBlock),
Italic(TextBlock),
Underline(TextBlock),
StrikeThrough(TextBlock),
Spoiler(TextBlock),
Code(TextBlock),
Pre(Pre),
TextLink(TextLink),
TextMention(TextMention),
CustomEmoji(InlineCustomEmoji),
}
Expand description
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
Variants§
Mention(TextBlock)
A mention (@username
)
HashTag(TextBlock)
A hashtag (#hashtag
)
CashTag(TextBlock)
A cashtag ($USD
)
BotCommand(TextBlock)
A bot command (/start@bot_name
)
Url(TextBlock)
An url (https://telegram.org
)
Email(TextBlock)
An email address (do-not-reply@telegram.org
)
PhoneNumber(TextBlock)
A phone number (+1-212-555-0123
)
Bold(TextBlock)
Bold text
Italic(TextBlock)
Italic text
Underline(TextBlock)
Underlined text
StrikeThrough(TextBlock)
strikethrough text
Spoiler(TextBlock)
spoiler message
Code(TextBlock)
A monowidth code string
Pre(Pre)
a monowidth code block
TextLink(TextLink)
A clickable text URL
TextMention(TextMention)
A mention of users without usernames
CustomEmoji(InlineCustomEmoji)
Inline custom emoji stickers
Trait Implementations§
source§impl Clone for MessageEntity
impl Clone for MessageEntity
source§fn clone(&self) -> MessageEntity
fn clone(&self) -> MessageEntity
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MessageEntity
impl Debug for MessageEntity
source§impl<'de> Deserialize<'de> for MessageEntity
impl<'de> Deserialize<'de> for MessageEntity
source§fn 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
source§impl PartialEq for MessageEntity
impl PartialEq for MessageEntity
source§fn eq(&self, other: &MessageEntity) -> bool
fn eq(&self, other: &MessageEntity) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for MessageEntity
impl Serialize for MessageEntity
impl Eq for MessageEntity
impl StructuralEq for MessageEntity
impl StructuralPartialEq for MessageEntity
Auto Trait Implementations§
impl RefUnwindSafe for MessageEntity
impl Send for MessageEntity
impl Sync for MessageEntity
impl Unpin for MessageEntity
impl UnwindSafe for MessageEntity
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
source§impl<T> CloneableStorage for Twhere
T: Any + Send + Sync + Clone,
impl<T> CloneableStorage for Twhere T: Any + Send + Sync + Clone,
fn clone_storage(&self) -> Box<dyn CloneableStorage>
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.