[][src]Struct tg_bot_models::Update

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>,
    pub poll: Option<Poll>,
}

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

poll: Option<Poll>

Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot

Trait Implementations

impl PartialEq<Update> for Update[src]

impl Clone for Update[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialOrd<Update> for Update[src]

impl Debug for Update[src]

impl Serialize for Update[src]

impl<'de> Deserialize<'de> for Update[src]

Auto Trait Implementations

impl Send for Update

impl Sync for Update

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]