[−][src]Struct tgbot::types::Update
Incoming update
Fields
id: Integer
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
kind: UpdateKind
Kind of update
Methods
impl Update
[src]
pub fn get_chat_id(&self) -> Option<Integer>
[src]
Returns a chat ID from update
pub fn get_chat_username(&self) -> Option<&str>
[src]
Returns a chat username from update
pub fn get_user(&self) -> Option<&User>
[src]
Returns a user ID from update
pub fn get_message(&self) -> Option<&Message>
[src]
Returns a message from update
Trait Implementations
impl Clone for Update
[src]
impl Debug for Update
[src]
impl<'de> Deserialize<'de> for Update
[src]
fn deserialize<D>(deserializer: D) -> Result<Update, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> 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>,