telegram_bot_types/
response.rs

1#[derive(Clone, Debug, Deserialize)]
2pub struct Message {
3    pub message_id: i64,
4    pub from: User,
5    pub date: i32,
6    pub chat: Chat,
7    pub text: Option<String>,
8}
9#[derive(Clone, Debug, Deserialize)]
10pub struct InlineQuery {
11    pub id: String,
12    pub from: User,
13    pub query: String,
14    pub offset: String,
15}
16#[derive(Clone, Debug, Deserialize)]
17pub struct ChosenInlineResult {
18    pub result_id: String,
19    pub from: User,
20    pub query: String,
21}
22#[derive(Clone, Debug, Deserialize)]
23pub struct User {
24    pub id: i64,
25    pub first_name: String,
26    pub last_name: Option<String>,
27    pub username: Option<String>,
28    pub language_code: Option<String>,
29}
30#[derive(Clone, Debug, Deserialize)]
31pub struct Chat {
32    pub id: i64,
33    #[serde(rename="type")]
34    pub chat_type: ChatType,
35    pub title: Option<String>,
36    pub username: Option<String>,
37    pub first_name: Option<String>,
38    pub last_name: Option<String>,
39    pub all_members_are_administrators: Option<bool>,
40}
41#[derive(Clone, Copy,  PartialEq, Eq, Debug, Deserialize)]
42#[serde(rename_all="lowercase")]
43pub enum ChatType {
44    Private,
45    Group,
46    SuperGroup,
47    Channel,
48}