[][src]Struct telegram_bot_raw::types::message::RawMessageEntity

pub struct RawMessageEntity {
    pub type_: String,
    pub offset: Integer,
    pub length: Integer,
    pub url: Option<String>,
    pub user: Option<User>,
}

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

impl Clone for RawMessageEntity[src]

impl Debug for RawMessageEntity[src]

impl<'de> Deserialize<'de> for RawMessageEntity[src]

impl PartialEq<RawMessageEntity> for RawMessageEntity[src]

impl PartialOrd<RawMessageEntity> for RawMessageEntity[src]

impl StructuralPartialEq for RawMessageEntity[src]

Auto Trait Implementations

impl RefUnwindSafe for RawMessageEntity[src]

impl Send for RawMessageEntity[src]

impl Sync for RawMessageEntity[src]

impl Unpin for RawMessageEntity[src]

impl UnwindSafe for RawMessageEntity[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.