Trait Message

Source
pub trait Message: Context {
    // Required methods
    fn message_id(&self) -> Id;
    fn from(&self) -> Option<&User>;
    fn date(&self) -> i64;
    fn chat(&self) -> &Chat;
}
Expand description

A general trait for all message contexts.

Required Methods§

Source

fn message_id(&self) -> Id

ID of the message.

Source

fn from(&self) -> Option<&User>

The author of the message.

Source

fn date(&self) -> i64

The timestamp of the message.

Source

fn chat(&self) -> &Chat

The chat to which the message was sent.

Implementors§