1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use super::Context;
use crate::types::{self, keyboard::inline, message, Chat, User};
pub trait Message: Context {
fn message_id(&self) -> message::Id;
fn from(&self) -> Option<&message::From>;
fn date(&self) -> i64;
fn chat(&self) -> &Chat;
}
pub trait MediaMessage: Message {
fn reply_to(&self) -> Option<&types::Message>;
fn author_signature(&self) -> Option<&str>;
fn reply_markup(&self) -> Option<&inline::Keyboard>;
fn via_bot(&self) -> Option<&User>;
}
pub trait Forward: MediaMessage {
fn forward(&self) -> Option<&message::Forward>;
}
pub trait EditedMessage: MediaMessage {
fn edit_date(&self) -> i64;
}