pub struct Message {
pub message_id: i64,
pub chat: Chat,
pub from: Option<User>,
pub date: i64,
pub text: Option<String>,
pub links: Vec<String>,
}Expand description
A plain message. text is the message’s text, or its caption when
the message carries media instead; links gathers the URLs from both
the entities and the caption_entities.
Fields§
§message_id: i64The message’s id within its chat — what edit_message and
delete_message address.
chat: ChatWhere the message arrived.
from: Option<User>Who sent it. Absent on channel posts and on messages Telegram attributes to the channel itself.
date: i64When the message was sent, as a Unix timestamp.
text: Option<String>The text, or the caption of a media message.
links: Vec<String>Every URL the message names: url entities sliced out of the text
by their UTF-16 offsets, then text_link entities’ own urls, in
wire order.
Trait Implementations§
impl Eq for Message
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.