#[non_exhaustive]pub struct Message {
pub id: Id,
pub from: Option<User>,
pub date: i64,
pub chat: Chat,
pub forward: Option<Forward>,
pub reply_to: Option<Box<Message>>,
pub edit_date: Option<i64>,
pub author_signature: Option<String>,
pub reply_markup: Option<Keyboard>,
pub kind: Kind,
pub via_bot: Option<User>,
}
Expand description
Represents a message.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: Id
The ID of the message.
from: Option<User>
The author of the message. Note that this field is None
for messages
from channels.
date: i64
The timestamp of the message.
chat: Chat
The chat to which the message was sent.
forward: Option<Forward>
If this message is a forward, information about the original message.
reply_to: Option<Box<Message>>
If Some
, the message that this message replies to.
edit_date: Option<i64>
If the message was edited, the date of last edit.
The author’s signature, if enabled for the channel.
reply_markup: Option<Keyboard>
The inline keyboard attached to the message.
kind: Kind
The kind of the message.
via_bot: Option<User>
The bot via which the message was sent.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
Source§fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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