[−][src]Struct carapax::prelude::Message
This object represents a message
Fields
id: i64
Unique message identifier inside this chat
date: i64
Date the message was sent in Unix time
kind: MessageKind
Contains chat-specific data
forward: Option<Forward>
Forwarded data
reply_to: Option<Box<Message>>
For replies, the original message Note that the Message object in this field will not contain further reply_to fields even if it itself is a reply
edit_date: Option<i64>
Date the message was last edited in Unix time
media_group_id: Option<String>
The unique identifier of a media message group this message belongs to
data: MessageData
Contains message data
commands: Option<Vec<BotCommand>>
Contains command data
Methods
impl Message
[src]
pub fn is_edited(&self) -> bool
[src]
Returns true if message has edited and false otherwise
pub fn get_chat_id(&self) -> i64
[src]
Returns ID of the chat
pub fn get_chat_username(&self) -> Option<&str>
[src]
Returns username of the chat
pub fn get_user(&self) -> Option<&User>
[src]
Returns author of the message
pub fn get_text(&self) -> Option<&Text>
[src]
Returns text of the message (includes caption)
Trait Implementations
impl<'de> Deserialize<'de> for Message
[src]
fn deserialize<D>(
deserializer: D
) -> Result<Message, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<Message, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl Debug for Message
[src]
impl Clone for Message
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,