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
39
40
41
42
43
44
45
use crate::types::*;
#[derive(Debug, Clone, PartialEq, PartialOrd, Deserialize)]
pub struct Update {
#[serde(rename = "update_id")]
pub id: Integer,
#[serde(flatten)]
pub kind: UpdateKind,
}
#[derive(Debug, Clone, PartialEq, PartialOrd, Deserialize)]
pub enum UpdateKind {
#[serde(rename = "message")]
Message(Message),
#[serde(rename = "edited_message")]
EditedMessage(Message),
#[serde(rename = "channel_post")]
ChannelPost(ChannelPost),
#[serde(rename = "edited_channel_post")]
EditedChannelPost(ChannelPost),
#[serde(rename = "inline_query")]
InlineQuery(InlineQuery),
#[serde(rename = "callback_query")]
CallbackQuery(CallbackQuery),
#[serde(rename = "poll")]
Poll(Poll),
#[serde(rename = "poll_answer")]
PollAnswer(PollAnswer),
#[doc(hidden)]
Error(String),
#[doc(hidden)]
Unknown,
}