Struct tg_bot_models::Update [−][src]
pub struct Update { pub update_id: i64, pub message: Option<Message>, pub edited_message: Option<Message>, pub channel_post: Option<Message>, pub edited_channel_post: Option<Message>, pub inline_query: Option<InlineQuery>, pub chosen_inline_result: Option<ChosenInlineResult>, pub callback_query: Option<CallbackQuery>, pub shipping_query: Option<ShippingQuery>, pub pre_checkout_query: Option<PreCheckoutQuery>, }
This object represents an incoming update.At most one of the optional parameters can be present in any given update.
Fields
update_id: i64
The update‘s unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you’re using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.
message: Option<Message>
Optional. New incoming message of any kind — text, photo, sticker, etc.
edited_message: Option<Message>
Optional. New version of a message that is known to the bot and was edited
channel_post: Option<Message>
Optional. New incoming channel post of any kind — text, photo, sticker, etc.
edited_channel_post: Option<Message>
Optional. New version of a channel post that is known to the bot and was edited
inline_query: Option<InlineQuery>
Optional. New incoming inline query
chosen_inline_result: Option<ChosenInlineResult>
Optional. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.
callback_query: Option<CallbackQuery>
Optional. New incoming callback query
shipping_query: Option<ShippingQuery>
Optional. New incoming shipping query. Only for invoices with flexible price
pre_checkout_query: Option<PreCheckoutQuery>
Optional. New incoming pre-checkout query. Contains full information about checkout
Trait Implementations
impl Debug for Update
[src]
impl Debug for Update
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Update
[src]
impl Clone for Update
fn clone(&self) -> Update
[src]
fn clone(&self) -> Update
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Update
[src]
impl PartialEq for Update
fn eq(&self, other: &Update) -> bool
[src]
fn eq(&self, other: &Update) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Update) -> bool
[src]
fn ne(&self, other: &Update) -> bool
This method tests for !=
.
impl PartialOrd for Update
[src]
impl PartialOrd for Update
fn partial_cmp(&self, other: &Update) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Update) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Update) -> bool
[src]
fn lt(&self, other: &Update) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Update) -> bool
[src]
fn le(&self, other: &Update) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Update) -> bool
[src]
fn gt(&self, other: &Update) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Update) -> bool
[src]
fn ge(&self, other: &Update) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more