pub enum Update {
Show 93 variants
TestUseUpdate(TestUseUpdate),
ActiveNotifications(UpdateActiveNotifications),
AnimatedEmojiMessageClicked(UpdateAnimatedEmojiMessageClicked),
AnimationSearchParameters(UpdateAnimationSearchParameters),
AuthorizationState(UpdateAuthorizationState),
BasicGroup(UpdateBasicGroup),
BasicGroupFullInfo(UpdateBasicGroupFullInfo),
Call(UpdateCall),
ChatAction(UpdateChatAction),
ChatActionBar(UpdateChatActionBar),
ChatDefaultDisableNotification(UpdateChatDefaultDisableNotification),
ChatDraftMessage(UpdateChatDraftMessage),
ChatFilters(UpdateChatFilters),
ChatHasProtectedContent(UpdateChatHasProtectedContent),
ChatHasScheduledMessages(UpdateChatHasScheduledMessages),
ChatIsBlocked(UpdateChatIsBlocked),
ChatIsMarkedAsUnread(UpdateChatIsMarkedAsUnread),
ChatLastMessage(UpdateChatLastMessage),
ChatMember(UpdateChatMember),
ChatMessageSender(UpdateChatMessageSender),
ChatMessageTtl(UpdateChatMessageTtl),
ChatNotificationSettings(UpdateChatNotificationSettings),
ChatOnlineMemberCount(UpdateChatOnlineMemberCount),
ChatPendingJoinRequests(UpdateChatPendingJoinRequests),
ChatPermissions(UpdateChatPermissions),
ChatPhoto(UpdateChatPhoto),
ChatPosition(UpdateChatPosition),
ChatReadInbox(UpdateChatReadInbox),
ChatReadOutbox(UpdateChatReadOutbox),
ChatReplyMarkup(UpdateChatReplyMarkup),
ChatTheme(UpdateChatTheme),
ChatThemes(UpdateChatThemes),
ChatTitle(UpdateChatTitle),
ChatUnreadMentionCount(UpdateChatUnreadMentionCount),
ChatVideoChat(UpdateChatVideoChat),
ConnectionState(UpdateConnectionState),
DeleteMessages(UpdateDeleteMessages),
DiceEmojis(UpdateDiceEmojis),
FavoriteStickers(UpdateFavoriteStickers),
File(UpdateFile),
FileGenerationStart(UpdateFileGenerationStart),
FileGenerationStop(UpdateFileGenerationStop),
GroupCall(UpdateGroupCall),
GroupCallParticipant(UpdateGroupCallParticipant),
HavePendingNotifications(UpdateHavePendingNotifications),
InstalledStickerSets(UpdateInstalledStickerSets),
LanguagePackStrings(UpdateLanguagePackStrings),
MessageContent(UpdateMessageContent),
MessageContentOpened(UpdateMessageContentOpened),
MessageEdited(UpdateMessageEdited),
MessageInteractionInfo(UpdateMessageInteractionInfo),
MessageIsPinned(UpdateMessageIsPinned),
MessageLiveLocationViewed(UpdateMessageLiveLocationViewed),
MessageMentionRead(UpdateMessageMentionRead),
MessageSendAcknowledged(UpdateMessageSendAcknowledged),
MessageSendFailed(UpdateMessageSendFailed),
MessageSendSucceeded(UpdateMessageSendSucceeded),
NewCallSignalingData(UpdateNewCallSignalingData),
NewCallbackQuery(UpdateNewCallbackQuery),
NewChat(UpdateNewChat),
NewChatJoinRequest(UpdateNewChatJoinRequest),
NewChosenInlineResult(UpdateNewChosenInlineResult),
NewCustomEvent(UpdateNewCustomEvent),
NewCustomQuery(UpdateNewCustomQuery),
NewInlineCallbackQuery(UpdateNewInlineCallbackQuery),
NewInlineQuery(UpdateNewInlineQuery),
NewMessage(UpdateNewMessage),
NewPreCheckoutQuery(UpdateNewPreCheckoutQuery),
NewShippingQuery(UpdateNewShippingQuery),
Notification(UpdateNotification),
NotificationGroup(UpdateNotificationGroup),
Option(UpdateOption),
Poll(UpdatePoll),
PollAnswer(UpdatePollAnswer),
RecentStickers(UpdateRecentStickers),
SavedAnimations(UpdateSavedAnimations),
ScopeNotificationSettings(UpdateScopeNotificationSettings),
SecretChat(UpdateSecretChat),
SelectedBackground(UpdateSelectedBackground),
ServiceNotification(UpdateServiceNotification),
StickerSet(UpdateStickerSet),
SuggestedActions(UpdateSuggestedActions),
Supergroup(UpdateSupergroup),
SupergroupFullInfo(UpdateSupergroupFullInfo),
TermsOfService(UpdateTermsOfService),
TrendingStickerSets(UpdateTrendingStickerSets),
UnreadChatCount(UpdateUnreadChatCount),
UnreadMessageCount(UpdateUnreadMessageCount),
User(UpdateUser),
UserFullInfo(UpdateUserFullInfo),
UserPrivacySettingRules(UpdateUserPrivacySettingRules),
UserStatus(UpdateUserStatus),
UsersNearby(UpdateUsersNearby),
// some variants omitted
}
Expand description
Contains notifications about data changes
Variants
TestUseUpdate(TestUseUpdate)
Tuple Fields
Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization
ActiveNotifications(UpdateActiveNotifications)
Tuple Fields
Contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update
AnimatedEmojiMessageClicked(UpdateAnimatedEmojiMessageClicked)
Tuple Fields
Some animated emoji message was clicked and a big animated sticker must be played if the message is visible on the screen. chatActionWatchingAnimations with the text of the message needs to be sent if the sticker is played
AnimationSearchParameters(UpdateAnimationSearchParameters)
Tuple Fields
The parameters of animation search through GetOption(“animation_search_bot_username”) bot has changed
AuthorizationState(UpdateAuthorizationState)
Tuple Fields
The user authorization state has changed
BasicGroup(UpdateBasicGroup)
Tuple Fields
Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the application
BasicGroupFullInfo(UpdateBasicGroupFullInfo)
Tuple Fields
Some data in basicGroupFullInfo has been changed
Call(UpdateCall)
Tuple Fields
0: UpdateCall
New call was created or information about a call was updated
ChatAction(UpdateChatAction)
Tuple Fields
A message sender activity in the chat has changed
ChatActionBar(UpdateChatActionBar)
Tuple Fields
The chat action bar was changed
ChatDefaultDisableNotification(UpdateChatDefaultDisableNotification)
Tuple Fields
The value of the default disable_notification parameter, used when a message is sent to the chat, was changed
ChatDraftMessage(UpdateChatDraftMessage)
Tuple Fields
A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update mustn’t be applied
ChatFilters(UpdateChatFilters)
Tuple Fields
The list of chat filters or a chat filter has changed
ChatHasProtectedContent(UpdateChatHasProtectedContent)
Tuple Fields
A chat content was allowed or restricted for saving
ChatHasScheduledMessages(UpdateChatHasScheduledMessages)
Tuple Fields
A chat’s has_scheduled_messages field has changed
ChatIsBlocked(UpdateChatIsBlocked)
Tuple Fields
A chat was blocked or unblocked
ChatIsMarkedAsUnread(UpdateChatIsMarkedAsUnread)
Tuple Fields
A chat was marked as unread or was read
ChatLastMessage(UpdateChatLastMessage)
Tuple Fields
The last message of a chat was changed. If last_message is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case
ChatMember(UpdateChatMember)
Tuple Fields
User rights changed in a chat; for bots only
ChatMessageSender(UpdateChatMessageSender)
Tuple Fields
The message sender that is selected to send messages in a chat has changed
ChatMessageTtl(UpdateChatMessageTtl)
Tuple Fields
The message Time To Live setting for a chat was changed
ChatNotificationSettings(UpdateChatNotificationSettings)
Tuple Fields
Notification settings for a chat were changed
ChatOnlineMemberCount(UpdateChatOnlineMemberCount)
Tuple Fields
The number of online group members has changed. This update with non-zero count is sent only for currently opened chats. There is no guarantee that it will be sent just after the count has changed
ChatPendingJoinRequests(UpdateChatPendingJoinRequests)
Tuple Fields
The chat pending join requests were changed
ChatPermissions(UpdateChatPermissions)
Tuple Fields
Chat permissions was changed
ChatPhoto(UpdateChatPhoto)
Tuple Fields
A chat photo was changed
ChatPosition(UpdateChatPosition)
Tuple Fields
The position of a chat in a chat list has changed. Instead of this update updateChatLastMessage or updateChatDraftMessage might be sent
ChatReadInbox(UpdateChatReadInbox)
Tuple Fields
Incoming messages were read or the number of unread messages has been changed
ChatReadOutbox(UpdateChatReadOutbox)
Tuple Fields
Outgoing messages were read
ChatReplyMarkup(UpdateChatReplyMarkup)
Tuple Fields
The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user
ChatTheme(UpdateChatTheme)
Tuple Fields
The chat theme was changed
ChatThemes(UpdateChatThemes)
Tuple Fields
The list of available chat themes has changed
ChatTitle(UpdateChatTitle)
Tuple Fields
The title of a chat was changed
ChatUnreadMentionCount(UpdateChatUnreadMentionCount)
Tuple Fields
The chat unread_mention_count has changed
ChatVideoChat(UpdateChatVideoChat)
Tuple Fields
A chat video chat state has changed
ConnectionState(UpdateConnectionState)
Tuple Fields
The connection state has changed. This update must be used only to show a human-readable description of the connection state
DeleteMessages(UpdateDeleteMessages)
Tuple Fields
Some messages were deleted
DiceEmojis(UpdateDiceEmojis)
Tuple Fields
The list of supported dice emojis has changed
FavoriteStickers(UpdateFavoriteStickers)
Tuple Fields
The list of favorite stickers was updated
File(UpdateFile)
Tuple Fields
0: UpdateFile
Information about a file was updated
FileGenerationStart(UpdateFileGenerationStart)
Tuple Fields
The file generation process needs to be started by the application
FileGenerationStop(UpdateFileGenerationStop)
Tuple Fields
File generation is no longer needed
GroupCall(UpdateGroupCall)
Tuple Fields
Information about a group call was updated
GroupCallParticipant(UpdateGroupCallParticipant)
Tuple Fields
Information about a group call participant was changed. The updates are sent only after the group call is received through getGroupCall and only if the call is joined or being joined
HavePendingNotifications(UpdateHavePendingNotifications)
Tuple Fields
Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications
InstalledStickerSets(UpdateInstalledStickerSets)
Tuple Fields
The list of installed sticker sets was updated
LanguagePackStrings(UpdateLanguagePackStrings)
Tuple Fields
Some language pack strings have been updated
MessageContent(UpdateMessageContent)
Tuple Fields
The message content has changed
MessageContentOpened(UpdateMessageContentOpened)
Tuple Fields
The message content was opened. Updates voice note messages to “listened”, video note messages to “viewed” and starts the TTL timer for self-destructing messages
MessageEdited(UpdateMessageEdited)
Tuple Fields
A message was edited. Changes in the message content will come in a separate updateMessageContent
MessageInteractionInfo(UpdateMessageInteractionInfo)
Tuple Fields
The information about interactions with a message has changed
MessageIsPinned(UpdateMessageIsPinned)
Tuple Fields
The message pinned state was changed
MessageLiveLocationViewed(UpdateMessageLiveLocationViewed)
Tuple Fields
A message with a live location was viewed. When the update is received, the application is supposed to update the live location
MessageMentionRead(UpdateMessageMentionRead)
Tuple Fields
A message with an unread mention was read
MessageSendAcknowledged(UpdateMessageSendAcknowledged)
Tuple Fields
A request to send a message has reached the Telegram server. This doesn’t mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option “use_quick_ack” is set to true. This update may be sent multiple times for the same message
MessageSendFailed(UpdateMessageSendFailed)
Tuple Fields
A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update
MessageSendSucceeded(UpdateMessageSendSucceeded)
Tuple Fields
A message has been successfully sent
NewCallSignalingData(UpdateNewCallSignalingData)
Tuple Fields
New call signaling data arrived
NewCallbackQuery(UpdateNewCallbackQuery)
Tuple Fields
A new incoming callback query; for bots only
NewChat(UpdateNewChat)
Tuple Fields
A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates
NewChatJoinRequest(UpdateNewChatJoinRequest)
Tuple Fields
A user sent a join request to a chat; for bots only
NewChosenInlineResult(UpdateNewChosenInlineResult)
Tuple Fields
The user has chosen a result of an inline query; for bots only
NewCustomEvent(UpdateNewCustomEvent)
Tuple Fields
A new incoming event; for bots only
NewCustomQuery(UpdateNewCustomQuery)
Tuple Fields
A new incoming query; for bots only
NewInlineCallbackQuery(UpdateNewInlineCallbackQuery)
Tuple Fields
A new incoming callback query from a message sent via a bot; for bots only
NewInlineQuery(UpdateNewInlineQuery)
Tuple Fields
A new incoming inline query; for bots only
NewMessage(UpdateNewMessage)
Tuple Fields
A new message was received; can also be an outgoing message
NewPreCheckoutQuery(UpdateNewPreCheckoutQuery)
Tuple Fields
A new incoming pre-checkout query; for bots only. Contains full information about a checkout
NewShippingQuery(UpdateNewShippingQuery)
Tuple Fields
A new incoming shipping query; for bots only. Only for invoices with flexible price
Notification(UpdateNotification)
Tuple Fields
A notification was changed
NotificationGroup(UpdateNotificationGroup)
Tuple Fields
A list of active notifications in a notification group has changed
Option(UpdateOption)
Tuple Fields
0: UpdateOption
An option changed its value
Poll(UpdatePoll)
Tuple Fields
0: UpdatePoll
A poll was updated; for bots only
PollAnswer(UpdatePollAnswer)
Tuple Fields
A user changed the answer to a poll; for bots only
RecentStickers(UpdateRecentStickers)
Tuple Fields
The list of recently used stickers was updated
SavedAnimations(UpdateSavedAnimations)
Tuple Fields
The list of saved animations was updated
ScopeNotificationSettings(UpdateScopeNotificationSettings)
Tuple Fields
Notification settings for some type of chats were updated
SecretChat(UpdateSecretChat)
Tuple Fields
Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the application
SelectedBackground(UpdateSelectedBackground)
Tuple Fields
The selected background has changed
ServiceNotification(UpdateServiceNotification)
Tuple Fields
A service notification from the server was received. Upon receiving this the application must show a popup with the content of the notification
StickerSet(UpdateStickerSet)
Tuple Fields
A sticker set has changed
SuggestedActions(UpdateSuggestedActions)
Tuple Fields
The list of suggested to the user actions has changed
Supergroup(UpdateSupergroup)
Tuple Fields
Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the application
SupergroupFullInfo(UpdateSupergroupFullInfo)
Tuple Fields
Some data in supergroupFullInfo has been changed
TermsOfService(UpdateTermsOfService)
Tuple Fields
New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method must be called with the reason “Decline ToS update”
TrendingStickerSets(UpdateTrendingStickerSets)
Tuple Fields
The list of trending sticker sets was updated or some of them were viewed
UnreadChatCount(UpdateUnreadChatCount)
Tuple Fields
Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used
UnreadMessageCount(UpdateUnreadMessageCount)
Tuple Fields
Number of unread messages in a chat list has changed. This update is sent only if the message database is used
User(UpdateUser)
Tuple Fields
0: UpdateUser
Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application
UserFullInfo(UpdateUserFullInfo)
Tuple Fields
Some data in userFullInfo has been changed
UserPrivacySettingRules(UpdateUserPrivacySettingRules)
Tuple Fields
Some privacy setting rules have been changed
UserStatus(UpdateUserStatus)
Tuple Fields
The user went online or offline
UsersNearby(UpdateUsersNearby)
Tuple Fields
The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request
Implementations
pub fn on_active_notifications<F: FnOnce(&UpdateActiveNotifications)>(
&self,
fnc: F
) -> &Self
pub fn on_animated_emoji_message_clicked<F: FnOnce(&UpdateAnimatedEmojiMessageClicked)>(
&self,
fnc: F
) -> &Self
pub fn on_animation_search_parameters<F: FnOnce(&UpdateAnimationSearchParameters)>(
&self,
fnc: F
) -> &Self
pub fn on_basic_group_full_info<F: FnOnce(&UpdateBasicGroupFullInfo)>(
&self,
fnc: F
) -> &Self
pub fn on_chat_default_disable_notification<F: FnOnce(&UpdateChatDefaultDisableNotification)>(
&self,
fnc: F
) -> &Self
pub fn on_chat_has_protected_content<F: FnOnce(&UpdateChatHasProtectedContent)>(
&self,
fnc: F
) -> &Self
pub fn on_chat_has_scheduled_messages<F: FnOnce(&UpdateChatHasScheduledMessages)>(
&self,
fnc: F
) -> &Self
pub fn on_chat_is_marked_as_unread<F: FnOnce(&UpdateChatIsMarkedAsUnread)>(
&self,
fnc: F
) -> &Self
pub fn on_chat_notification_settings<F: FnOnce(&UpdateChatNotificationSettings)>(
&self,
fnc: F
) -> &Self
pub fn on_chat_online_member_count<F: FnOnce(&UpdateChatOnlineMemberCount)>(
&self,
fnc: F
) -> &Self
pub fn on_chat_pending_join_requests<F: FnOnce(&UpdateChatPendingJoinRequests)>(
&self,
fnc: F
) -> &Self
pub fn on_chat_unread_mention_count<F: FnOnce(&UpdateChatUnreadMentionCount)>(
&self,
fnc: F
) -> &Self
pub fn on_file_generation_start<F: FnOnce(&UpdateFileGenerationStart)>(
&self,
fnc: F
) -> &Self
pub fn on_group_call_participant<F: FnOnce(&UpdateGroupCallParticipant)>(
&self,
fnc: F
) -> &Self
pub fn on_have_pending_notifications<F: FnOnce(&UpdateHavePendingNotifications)>(
&self,
fnc: F
) -> &Self
pub fn on_installed_sticker_sets<F: FnOnce(&UpdateInstalledStickerSets)>(
&self,
fnc: F
) -> &Self
pub fn on_language_pack_strings<F: FnOnce(&UpdateLanguagePackStrings)>(
&self,
fnc: F
) -> &Self
pub fn on_message_content_opened<F: FnOnce(&UpdateMessageContentOpened)>(
&self,
fnc: F
) -> &Self
pub fn on_message_interaction_info<F: FnOnce(&UpdateMessageInteractionInfo)>(
&self,
fnc: F
) -> &Self
pub fn on_message_live_location_viewed<F: FnOnce(&UpdateMessageLiveLocationViewed)>(
&self,
fnc: F
) -> &Self
pub fn on_message_send_acknowledged<F: FnOnce(&UpdateMessageSendAcknowledged)>(
&self,
fnc: F
) -> &Self
pub fn on_message_send_succeeded<F: FnOnce(&UpdateMessageSendSucceeded)>(
&self,
fnc: F
) -> &Self
pub fn on_new_call_signaling_data<F: FnOnce(&UpdateNewCallSignalingData)>(
&self,
fnc: F
) -> &Self
pub fn on_new_chat_join_request<F: FnOnce(&UpdateNewChatJoinRequest)>(
&self,
fnc: F
) -> &Self
pub fn on_new_chosen_inline_result<F: FnOnce(&UpdateNewChosenInlineResult)>(
&self,
fnc: F
) -> &Self
pub fn on_new_inline_callback_query<F: FnOnce(&UpdateNewInlineCallbackQuery)>(
&self,
fnc: F
) -> &Self
pub fn on_new_pre_checkout_query<F: FnOnce(&UpdateNewPreCheckoutQuery)>(
&self,
fnc: F
) -> &Self
pub fn on_scope_notification_settings<F: FnOnce(&UpdateScopeNotificationSettings)>(
&self,
fnc: F
) -> &Self
pub fn on_service_notification<F: FnOnce(&UpdateServiceNotification)>(
&self,
fnc: F
) -> &Self
pub fn on_trending_sticker_sets<F: FnOnce(&UpdateTrendingStickerSets)>(
&self,
fnc: F
) -> &Self
pub fn on_user_privacy_setting_rules<F: FnOnce(&UpdateUserPrivacySettingRules)>(
&self,
fnc: F
) -> &Self
pub fn as_animated_emoji_message_clicked(
&self
) -> Option<&UpdateAnimatedEmojiMessageClicked>
pub fn as_chat_default_disable_notification(
&self
) -> Option<&UpdateChatDefaultDisableNotification>
pub fn animated_emoji_message_clicked<T: AsRef<UpdateAnimatedEmojiMessageClicked>>(
t: T
) -> Self
pub fn chat_default_disable_notification<T: AsRef<UpdateChatDefaultDisableNotification>>(
t: T
) -> Self
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Update
impl UnwindSafe for Update
Blanket Implementations
Mutably borrows from an owned value. Read more