pub struct Message {
pub id: MessageId,
pub from: User,
pub date: i64,
pub chat: MessageChat,
pub forward: Option<Forward>,
pub reply_to_message: Option<Box<MessageOrChannelPost>>,
pub edit_date: Option<i64>,
pub kind: MessageKind,
}
Expand description
This object represents a chat message.
Fields§
§id: MessageId
Unique message identifier inside this chat.
from: User
Sender, can be empty for messages sent to channels.
date: i64
Date the message was sent in Unix time.
chat: MessageChat
Conversation the message belongs to.
forward: Option<Forward>
Information about the original message.
reply_to_message: Option<Box<MessageOrChannelPost>>
For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
edit_date: Option<i64>
Date the message was last edited in Unix time.
kind: MessageKind
Kind of the message.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Message, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Message, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl MessageGetFiles for Message
impl MessageGetFiles for Message
Source§impl MessageText for Message
impl MessageText for Message
Source§impl PartialOrd for Message
impl PartialOrd for Message
Source§impl ToMessageId for Message
impl ToMessageId for Message
fn to_message_id(&self) -> MessageId
Source§impl ToSourceChat for Message
impl ToSourceChat for Message
fn to_source_chat(&self) -> ChatId
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more