pub struct MessageEntity {
pub kind: MessageEntityKind,
pub offset: u32,
pub length: u32,
pub url: Option<String>,
pub user: Option<User>,
pub language: Option<String>,
pub custom_emoji_id: Option<String>,
pub unix_time: Option<i64>,
pub date_time_format: Option<String>,
}Expand description
One special entity in a message text.
Fields§
§kind: MessageEntityKindType of the entity.
offset: u32Offset in UTF-16 code units to the start of the entity.
length: u32Length of the entity in UTF-16 code units.
url: Option<String>For TextLink — URL.
user: Option<User>For TextMention — the mentioned user.
language: Option<String>For Pre — the programming language.
custom_emoji_id: Option<String>For CustomEmoji — identifier of the custom emoji.
unix_time: Option<i64>For DateTime — Unix time.
date_time_format: Option<String>For DateTime — format string (r|w?[dD]?[tT]?).
Trait Implementations§
Source§impl Clone for MessageEntity
impl Clone for MessageEntity
Source§fn clone(&self) -> MessageEntity
fn clone(&self) -> MessageEntity
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 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
Auto Trait Implementations§
impl Freeze for MessageEntity
impl RefUnwindSafe for MessageEntity
impl Send for MessageEntity
impl Sync for MessageEntity
impl Unpin for MessageEntity
impl UnsafeUnpin 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