Struct telegram_types::bot::types::MessageEntity
source · pub struct MessageEntity {
pub kind: MessageEntityKind,
pub offset: i32,
pub length: i32,
pub url: Option<String>,
pub user: Option<Box<User>>,
}
Expand description
One special entity in a text message. For example, hashtags, usernames, URLs, etc.
Fields
kind: MessageEntityKind
Type of the entity.
offset: i32
Offset in UTF-16 code units to the start of the entity
length: i32
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<Box<User>>
For “text_mention” only, the mentioned user
Trait Implementations
sourceimpl Clone for MessageEntity
impl Clone for MessageEntity
sourcefn clone(&self) -> MessageEntity
fn clone(&self) -> MessageEntity
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 MessageEntity
impl Debug for MessageEntity
sourceimpl<'de> Deserialize<'de> for MessageEntity
impl<'de> Deserialize<'de> for MessageEntity
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<MessageEntity> for MessageEntity
impl PartialEq<MessageEntity> for MessageEntity
sourcefn eq(&self, other: &MessageEntity) -> bool
fn eq(&self, other: &MessageEntity) -> bool
sourceimpl 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
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