Struct apid_telegram_bot::Update
source · [−]pub struct Update {
pub update_id: i32,
pub event: Option<UpdateEvent>,
}Expand description
This object represents an incoming update. At most one of the optional parameters can be present in any given update.
Fields
update_id: i32The 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.
event: Option<UpdateEvent>The event encoded in the update. As specified above, the optional parameters can be present at most one. Thus we provide event separated for ease of use.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Update
impl<'de> Deserialize<'de> for Update
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Update
impl Send for Update
impl Sync for Update
impl Unpin for Update
impl UnwindSafe for Update
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more