[−][src]Struct tg_bot_models::Update
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(&self) -> 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]
fn partial_cmp(&self, other: &Update) -> Option<Ordering>
[src]
fn lt(&self, other: &Update) -> bool
[src]
fn le(&self, other: &Update) -> bool
[src]
fn gt(&self, other: &Update) -> bool
[src]
fn ge(&self, other: &Update) -> bool
[src]
impl Debug for Update
[src]
impl Serialize for Update
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Update
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,