pub struct RawMessageEntity {
pub type_: String,
pub offset: i64,
pub length: i64,
pub url: Option<String>,
pub user: Option<User>,
}Expand description
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. Directly mapped.
Fields§
§type_: StringType of the entity. Can be mention (@username), hashtag, bot_command, url, email, bold (bold text), italic (italic text), code (monowidth string), pre (monowidth block), text_link (for clickable text URLs), text_mention (for users without usernames).
offset: i64Offset in UTF-16 code units to the start of the entity.
length: i64Length of the entity in UTF-16 code units.
url: Option<String>For “text_link” only, url that will be opened after user taps on the text.
user: Option<User>For “text_mention” only, the mentioned user.
Trait Implementations§
Source§impl Clone for RawMessageEntity
impl Clone for RawMessageEntity
Source§fn clone(&self) -> RawMessageEntity
fn clone(&self) -> RawMessageEntity
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 RawMessageEntity
impl Debug for RawMessageEntity
Source§impl<'de> Deserialize<'de> for RawMessageEntity
impl<'de> Deserialize<'de> for RawMessageEntity
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RawMessageEntity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RawMessageEntity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RawMessageEntity
impl PartialEq for RawMessageEntity
Source§impl PartialOrd for RawMessageEntity
impl PartialOrd for RawMessageEntity
impl StructuralPartialEq for RawMessageEntity
Auto Trait Implementations§
impl Freeze for RawMessageEntity
impl RefUnwindSafe for RawMessageEntity
impl Send for RawMessageEntity
impl Sync for RawMessageEntity
impl Unpin for RawMessageEntity
impl UnwindSafe for RawMessageEntity
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