pub struct Message {Show 17 fields
pub message_id: i64,
pub from: Option<User>,
pub chat: Chat,
pub date: i64,
pub edit_date: Option<i64>,
pub text: Option<String>,
pub caption: Option<String>,
pub entities: Option<Vec<MessageEntity>>,
pub reply_to_message: Option<Box<Message>>,
pub sticker: Option<Sticker>,
pub photo: Option<Vec<PhotoSize>>,
pub video: Option<MediaFile>,
pub audio: Option<MediaFile>,
pub voice: Option<MediaFile>,
pub document: Option<MediaFile>,
pub animation: Option<MediaFile>,
pub message_thread_id: Option<i64>,
}Expand description
Telegram Message object
Fields§
§message_id: i64§from: Option<User>§chat: Chat§date: i64§edit_date: Option<i64>Edit timestamp for an edited message.
text: Option<String>§caption: Option<String>Caption under attached media — media messages carry their text here
instead of text.
entities: Option<Vec<MessageEntity>>§reply_to_message: Option<Box<Message>>§sticker: Option<Sticker>A sticker attached to the message.
photo: Option<Vec<PhotoSize>>Attached photo, largest variant last.
video: Option<MediaFile>Attached video.
audio: Option<MediaFile>Attached audio track.
voice: Option<MediaFile>Attached voice note.
document: Option<MediaFile>Attached document.
animation: Option<MediaFile>Attached animation (GIF).
message_thread_id: Option<i64>Forum topic the message was posted to, if the chat has topics.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin 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