Message

Struct Message 

Source
pub struct Message {
Show 23 fields pub id: i64, pub sender_user_id: i32, pub chat_id: i64, pub sending_state: Option<MessageSendingState>, pub is_outgoing: bool, pub can_be_edited: bool, pub can_be_forwarded: bool, pub can_be_deleted_only_for_self: bool, pub can_be_deleted_for_all_users: bool, pub is_channel_post: bool, pub contains_unread_mention: bool, pub date: i32, pub edit_date: i32, pub forward_info: Option<MessageForwardInfo>, pub reply_to_message_id: i64, pub ttl: i32, pub ttl_expires_in: f64, pub via_bot_user_id: i32, pub author_signature: String, pub views: i32, pub media_album_id: i64, pub content: MessageContent, pub reply_markup: Option<ReplyMarkup>,
}
Expand description

Describes a message

Fields§

§id: i64

Message identifier, unique for the chat to which the message belongs

§sender_user_id: i32

Identifier of the user who sent the message; 0 if unknown. It is unknown for channel posts

§chat_id: i64

Chat identifier

§sending_state: Option<MessageSendingState>

Information about the sending state of the message; may be null

§is_outgoing: bool

True, if the message is outgoing

§can_be_edited: bool

True, if the message can be edited

§can_be_forwarded: bool

True, if the message can be forwarded

§can_be_deleted_only_for_self: bool

True, if the message can be deleted only for the current user while other users will continue to see it

§can_be_deleted_for_all_users: bool

True, if the message can be deleted for all users

§is_channel_post: bool

True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts

§contains_unread_mention: bool

True, if the message contains an unread mention for the current user

§date: i32

Point in time (Unix timestamp) when the message was sent

§edit_date: i32

Point in time (Unix timestamp) when the message was last edited

§forward_info: Option<MessageForwardInfo>

Information about the initial message sender; may be null

§reply_to_message_id: i64

If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message

§ttl: i32

For self-destructing messages, the message’s TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires

§ttl_expires_in: f64

Time left before the message expires, in seconds

§via_bot_user_id: i32

If non-zero, the user identifier of the bot through which this message was sent

§author_signature: String

For channel posts, optional author signature

§views: i32

Number of times this message was viewed

§media_album_id: i64

Unique identifier of an album this message belongs to. Only photos and videos can be grouped together in albums

§content: MessageContent

Content of the message

§reply_markup: Option<ReplyMarkup>

Reply markup for the message; may be null

Trait Implementations§

Source§

impl Clone for Message

Source§

fn clone(&self) -> Message

Returns a duplicate 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 Message

Source§

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

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

impl<'de> Deserialize<'de> for Message

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Message

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

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