pub enum MessageEntityKind {
}Expand description
Type of the message entity
Variants§
Mention
@username
Hashtag
#hashtag
Cashtag
$USD
BotCommand
/start@jobs_bot
Url
https://telegram.org
do-not-reply@telegram.org
PhoneNumber
+1-212-555-0123
Bold
bold text
Italic
italic text
Underline
underlined text
Strikethrough
strikethrough text
Code
monowidth string
Pre
monowidth block
TextLink
clickable text URLs
TextMention
mention for users without usernames
Spoiler
spoiler message
Implementations§
Source§impl MessageEntityKind
impl MessageEntityKind
pub fn code_language(&self) -> Option<&str>
pub fn clickable_url(&self) -> Option<&str>
pub fn text_metioned_user(&self) -> Option<&User>
pub fn is_mention(&self) -> bool
pub fn is_hashtag(&self) -> bool
pub fn is_cashtag(&self) -> bool
pub fn is_bot_command(&self) -> bool
pub fn is_url(&self) -> bool
pub fn is_email(&self) -> bool
pub fn is_phone_number(&self) -> bool
pub fn is_bold(&self) -> bool
pub fn is_italic(&self) -> bool
pub fn is_underline(&self) -> bool
pub fn is_strikethrough(&self) -> bool
pub fn is_inline_code(&self) -> bool
pub fn is_code_block(&self) -> bool
pub fn is_clickable_link(&self) -> bool
pub fn is_text_mention(&self) -> bool
Trait Implementations§
Source§impl Clone for MessageEntityKind
impl Clone for MessageEntityKind
Source§fn clone(&self) -> MessageEntityKind
fn clone(&self) -> MessageEntityKind
Returns a duplicate 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 MessageEntityKind
impl Debug for MessageEntityKind
Source§impl<'de> Deserialize<'de> for MessageEntityKind
impl<'de> Deserialize<'de> for MessageEntityKind
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
Auto Trait Implementations§
impl Freeze for MessageEntityKind
impl RefUnwindSafe for MessageEntityKind
impl Send for MessageEntityKind
impl Sync for MessageEntityKind
impl Unpin for MessageEntityKind
impl UnwindSafe for MessageEntityKind
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