Struct telegram_bot_fork_raw::types::message::Message
source · pub struct Message {
pub id: MessageId,
pub from: User,
pub date: Integer,
pub chat: MessageChat,
pub forward: Option<Forward>,
pub reply_to_message: Option<Box<MessageOrChannelPost>>,
pub edit_date: Option<Integer>,
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: Integer
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<Integer>
Date the message was last edited in Unix time.
kind: MessageKind
Kind of the message.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
sourcefn deserialize<D>(deserializer: D) -> Result<Message, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Message, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialOrd<Message> for Message
impl PartialOrd<Message> for Message
sourcefn partial_cmp(&self, other: &Message) -> Option<Ordering>
fn partial_cmp(&self, other: &Message) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl ToMessageId for Message
impl ToMessageId for Message
fn to_message_id(&self) -> MessageId
sourceimpl ToSourceChat for Message
impl ToSourceChat for Message
fn to_source_chat(&self) -> ChatId
impl StructuralPartialEq for Message
Auto Trait Implementations
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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