[][src]Struct tbot::types::message::Message

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,

Represents a message.

Fields (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 messagr.

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.

author_signature: Option<String>

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.

Trait Implementations

impl Clone for Message[src]

impl Debug for Message[src]

impl<'de> Deserialize<'de> for Message[src]

impl PartialEq<Message> for Message[src]

impl StructuralPartialEq for Message[src]

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

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.