Struct telegram_bot_fork_raw::types::message::RawMessageEntity
source · pub struct RawMessageEntity {
pub type_: String,
pub offset: Integer,
pub length: Integer,
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_: String
Type 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: Integer
Offset in UTF-16 code units to the start of the entity.
length: Integer
Length 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
sourceimpl Clone for RawMessageEntity
impl Clone for RawMessageEntity
sourcefn clone(&self) -> RawMessageEntity
fn clone(&self) -> RawMessageEntity
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for RawMessageEntity
impl Debug for RawMessageEntity
sourceimpl<'de> Deserialize<'de> for RawMessageEntity
impl<'de> Deserialize<'de> for RawMessageEntity
sourcefn 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
sourceimpl PartialEq<RawMessageEntity> for RawMessageEntity
impl PartialEq<RawMessageEntity> for RawMessageEntity
sourcefn eq(&self, other: &RawMessageEntity) -> bool
fn eq(&self, other: &RawMessageEntity) -> bool
sourceimpl PartialOrd<RawMessageEntity> for RawMessageEntity
impl PartialOrd<RawMessageEntity> for RawMessageEntity
sourcefn partial_cmp(&self, other: &RawMessageEntity) -> Option<Ordering>
fn partial_cmp(&self, other: &RawMessageEntity) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl StructuralPartialEq for RawMessageEntity
Auto Trait Implementations
impl RefUnwindSafe for RawMessageEntity
impl Send for RawMessageEntity
impl Sync for RawMessageEntity
impl Unpin for RawMessageEntity
impl UnwindSafe for RawMessageEntity
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more