pub enum MessageEntity {
Show 21 variants Unknown(MessageEntityUnknown), Mention(MessageEntityMention), Hashtag(MessageEntityHashtag), BotCommand(MessageEntityBotCommand), Url(MessageEntityUrl), Email(MessageEntityEmail), Bold(MessageEntityBold), Italic(MessageEntityItalic), Code(MessageEntityCode), Pre(MessageEntityPre), TextUrl(MessageEntityTextUrl), MentionName(MessageEntityMentionName), InputMessageEntityMentionName(InputMessageEntityMentionName), Phone(MessageEntityPhone), Cashtag(MessageEntityCashtag), Underline(MessageEntityUnderline), Strike(MessageEntityStrike), BankCard(MessageEntityBankCard), Spoiler(MessageEntitySpoiler), CustomEmoji(MessageEntityCustomEmoji), Blockquote(MessageEntityBlockquote),
}

Variants§

Implementations§

source§

impl MessageEntity

source

pub fn length(&self) -> i32

source

pub fn offset(&self) -> i32

Trait Implementations§

source§

impl Clone for MessageEntity

source§

fn clone(&self) -> MessageEntity

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MessageEntity

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deserializable for MessageEntity

source§

fn deserialize(buf: Buffer<'_, '_>) -> Result<Self>

Deserializes an instance of the type from a given buffer.
source§

fn from_bytes(buf: &[u8]) -> Result<Self>where Self: Sized,

Convenience function to deserialize an instance from a given buffer. Read more
source§

impl From<InputMessageEntityMentionName> for MessageEntity

source§

fn from(x: InputMessageEntityMentionName) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityBankCard> for MessageEntity

source§

fn from(x: MessageEntityBankCard) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityBlockquote> for MessageEntity

source§

fn from(x: MessageEntityBlockquote) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityBold> for MessageEntity

source§

fn from(x: MessageEntityBold) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityBotCommand> for MessageEntity

source§

fn from(x: MessageEntityBotCommand) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityCashtag> for MessageEntity

source§

fn from(x: MessageEntityCashtag) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityCode> for MessageEntity

source§

fn from(x: MessageEntityCode) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityCustomEmoji> for MessageEntity

source§

fn from(x: MessageEntityCustomEmoji) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityEmail> for MessageEntity

source§

fn from(x: MessageEntityEmail) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityHashtag> for MessageEntity

source§

fn from(x: MessageEntityHashtag) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityItalic> for MessageEntity

source§

fn from(x: MessageEntityItalic) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityMention> for MessageEntity

source§

fn from(x: MessageEntityMention) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityMentionName> for MessageEntity

source§

fn from(x: MessageEntityMentionName) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityPhone> for MessageEntity

source§

fn from(x: MessageEntityPhone) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityPre> for MessageEntity

source§

fn from(x: MessageEntityPre) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntitySpoiler> for MessageEntity

source§

fn from(x: MessageEntitySpoiler) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityStrike> for MessageEntity

source§

fn from(x: MessageEntityStrike) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityTextUrl> for MessageEntity

source§

fn from(x: MessageEntityTextUrl) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityUnderline> for MessageEntity

source§

fn from(x: MessageEntityUnderline) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityUnknown> for MessageEntity

source§

fn from(x: MessageEntityUnknown) -> Self

Converts to this type from the input type.
source§

impl From<MessageEntityUrl> for MessageEntity

source§

fn from(x: MessageEntityUrl) -> Self

Converts to this type from the input type.
source§

impl PartialEq for MessageEntity

source§

fn eq(&self, other: &MessageEntity) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serializable for MessageEntity

source§

fn serialize(&self, buf: Buffer<'_>)

Serializes the instance into the given buffer.
source§

fn to_bytes(&self) -> Vec<u8>

Convenience function to serialize the object into a new buffer and return its bytes. It is more efficient to reuse a existing buffer with Serializable::serialize.
source§

impl TryFrom<MessageEntity> for InputMessageEntityMentionName

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityBankCard

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityBlockquote

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityBold

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityBotCommand

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityCashtag

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityCode

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityCustomEmoji

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityEmail

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityHashtag

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityItalic

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityMention

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityMentionName

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityPhone

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityPre

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntitySpoiler

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityStrike

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityTextUrl

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityUnderline

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityUnknown

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<MessageEntity> for MessageEntityUrl

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(x: MessageEntity) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl StructuralPartialEq for MessageEntity

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.