Enum grammers_client::types::update::Update
source · #[non_exhaustive]pub enum Update {
NewMessage(Message),
MessageEdited(Message),
MessageDeleted(MessageDeletion),
CallbackQuery(CallbackQuery),
InlineQuery(InlineQuery),
Raw(Update),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NewMessage(Message)
Occurs whenever a new text message or a message with media is produced.
MessageEdited(Message)
Occurs when a message is updated.
MessageDeleted(MessageDeletion)
Occurs when a message is deleted.
CallbackQuery(CallbackQuery)
Occurs when Telegram calls back into your bot because an inline callback button was pressed.
InlineQuery(InlineQuery)
Occurs whenever you sign in as a bot and a user sends an inline query
such as @bot query
.
Raw(Update)
Raw events are not actual events. Instead, they are the raw Update object that Telegram sends. You normally shouldn’t need these.
NOTE: the library can split raw updates into actual Update
variants so use this only as the workaround when such variant is not
available yet.
Trait Implementations§
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more