Enum rtdlib::types::Update [−][src]
pub enum Update {
Show 71 variants
TestUseUpdate(TestUseUpdate),
ActiveNotifications(UpdateActiveNotifications),
AuthorizationState(UpdateAuthorizationState),
BasicGroup(UpdateBasicGroup),
BasicGroupFullInfo(UpdateBasicGroupFullInfo),
Call(UpdateCall),
ChatDefaultDisableNotification(UpdateChatDefaultDisableNotification),
ChatDraftMessage(UpdateChatDraftMessage),
ChatIsMarkedAsUnread(UpdateChatIsMarkedAsUnread),
ChatIsPinned(UpdateChatIsPinned),
ChatIsSponsored(UpdateChatIsSponsored),
ChatLastMessage(UpdateChatLastMessage),
ChatNotificationSettings(UpdateChatNotificationSettings),
ChatOnlineMemberCount(UpdateChatOnlineMemberCount),
ChatOrder(UpdateChatOrder),
ChatPermissions(UpdateChatPermissions),
ChatPhoto(UpdateChatPhoto),
ChatPinnedMessage(UpdateChatPinnedMessage),
ChatReadInbox(UpdateChatReadInbox),
ChatReadOutbox(UpdateChatReadOutbox),
ChatReplyMarkup(UpdateChatReplyMarkup),
ChatTitle(UpdateChatTitle),
ChatUnreadMentionCount(UpdateChatUnreadMentionCount),
ConnectionState(UpdateConnectionState),
DeleteMessages(UpdateDeleteMessages),
FavoriteStickers(UpdateFavoriteStickers),
File(UpdateFile),
FileGenerationStart(UpdateFileGenerationStart),
FileGenerationStop(UpdateFileGenerationStop),
HavePendingNotifications(UpdateHavePendingNotifications),
InstalledStickerSets(UpdateInstalledStickerSets),
LanguagePackStrings(UpdateLanguagePackStrings),
MessageContent(UpdateMessageContent),
MessageContentOpened(UpdateMessageContentOpened),
MessageEdited(UpdateMessageEdited),
MessageMentionRead(UpdateMessageMentionRead),
MessageSendAcknowledged(UpdateMessageSendAcknowledged),
MessageSendFailed(UpdateMessageSendFailed),
MessageSendSucceeded(UpdateMessageSendSucceeded),
MessageViews(UpdateMessageViews),
NewCallbackQuery(UpdateNewCallbackQuery),
NewChat(UpdateNewChat),
NewChosenInlineResult(UpdateNewChosenInlineResult),
NewCustomEvent(UpdateNewCustomEvent),
NewCustomQuery(UpdateNewCustomQuery),
NewInlineCallbackQuery(UpdateNewInlineCallbackQuery),
NewInlineQuery(UpdateNewInlineQuery),
NewMessage(UpdateNewMessage),
NewPreCheckoutQuery(UpdateNewPreCheckoutQuery),
NewShippingQuery(UpdateNewShippingQuery),
Notification(UpdateNotification),
NotificationGroup(UpdateNotificationGroup),
Option(UpdateOption),
Poll(UpdatePoll),
RecentStickers(UpdateRecentStickers),
SavedAnimations(UpdateSavedAnimations),
ScopeNotificationSettings(UpdateScopeNotificationSettings),
SecretChat(UpdateSecretChat),
SelectedBackground(UpdateSelectedBackground),
ServiceNotification(UpdateServiceNotification),
Supergroup(UpdateSupergroup),
SupergroupFullInfo(UpdateSupergroupFullInfo),
TermsOfService(UpdateTermsOfService),
TrendingStickerSets(UpdateTrendingStickerSets),
UnreadChatCount(UpdateUnreadChatCount),
UnreadMessageCount(UpdateUnreadMessageCount),
User(UpdateUser),
UserChatAction(UpdateUserChatAction),
UserFullInfo(UpdateUserFullInfo),
UserPrivacySettingRules(UpdateUserPrivacySettingRules),
UserStatus(UpdateUserStatus),
// some variants omitted
}
Expand description
Contains notifications about data changes
Variants
Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization
Tuple Fields of TestUseUpdate
Contains active notifications that was shown on previous application launches. This update is sent only if a message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update
Tuple Fields of ActiveNotifications
The user authorization state has changed
Tuple Fields of AuthorizationState
Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the client
Tuple Fields of BasicGroup
Some data from basicGroupFullInfo has been changed
Tuple Fields of BasicGroupFullInfo
New call was created or information about a call was updated
Tuple Fields of Call
0: UpdateCall
The value of the default disable_notification parameter, used when a message is sent to the chat, was changed
Tuple Fields of ChatDefaultDisableNotification
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 shouldn’t be applied
Tuple Fields of ChatDraftMessage
A chat was marked as unread or was read
Tuple Fields of ChatIsMarkedAsUnread
A chat was pinned or unpinned
Tuple Fields of ChatIsPinned
A chat’s is_sponsored field has changed
Tuple Fields of ChatIsSponsored
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
Tuple Fields of ChatLastMessage
Notification settings for a chat were changed
Tuple Fields of ChatNotificationSettings
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
Tuple Fields of ChatOnlineMemberCount
The order of the chat in the chat list has changed. Instead of this update updateChatLastMessage, updateChatIsPinned or updateChatDraftMessage might be sent
Tuple Fields of ChatOrder
Chat permissions was changed
Tuple Fields of ChatPermissions
A chat photo was changed
Tuple Fields of ChatPhoto
The chat pinned message was changed
Tuple Fields of ChatPinnedMessage
Incoming messages were read or number of unread messages has been changed
Tuple Fields of ChatReadInbox
Outgoing messages were read
Tuple Fields of ChatReadOutbox
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
Tuple Fields of ChatReplyMarkup
The title of a chat was changed
Tuple Fields of ChatTitle
The chat unread_mention_count has changed
Tuple Fields of ChatUnreadMentionCount
The connection state has changed
Tuple Fields of ConnectionState
Some messages were deleted
Tuple Fields of DeleteMessages
The list of favorite stickers was updated
Tuple Fields of FavoriteStickers
Information about a file was updated
Tuple Fields of File
0: UpdateFile
The file generation process needs to be started by the client
Tuple Fields of FileGenerationStart
File generation is no longer needed
Tuple Fields of FileGenerationStop
Describes, whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications
Tuple Fields of HavePendingNotifications
The list of installed sticker sets was updated
Tuple Fields of InstalledStickerSets
Some language pack strings have been updated
Tuple Fields of LanguagePackStrings
The message content has changed
Tuple Fields of MessageContent
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
Tuple Fields of MessageContentOpened
A message was edited. Changes in the message content will come in a separate updateMessageContent
Tuple Fields of MessageEdited
A message with an unread mention was read
Tuple Fields of MessageMentionRead
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
Tuple Fields of MessageSendAcknowledged
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
Tuple Fields of MessageSendFailed
A message has been successfully sent
Tuple Fields of MessageSendSucceeded
The view count of the message has changed
Tuple Fields of MessageViews
A new incoming callback query; for bots only
Tuple Fields of NewCallbackQuery
A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the client. The chat field changes will be reported through separate updates
Tuple Fields of NewChat
The user has chosen a result of an inline query; for bots only
Tuple Fields of NewChosenInlineResult
A new incoming event; for bots only
Tuple Fields of NewCustomEvent
A new incoming query; for bots only
Tuple Fields of NewCustomQuery
A new incoming callback query from a message sent via a bot; for bots only
Tuple Fields of NewInlineCallbackQuery
A new incoming inline query; for bots only
Tuple Fields of NewInlineQuery
A new message was received; can also be an outgoing message
Tuple Fields of NewMessage
A new incoming pre-checkout query; for bots only. Contains full information about a checkout
Tuple Fields of NewPreCheckoutQuery
A new incoming shipping query; for bots only. Only for invoices with flexible price
Tuple Fields of NewShippingQuery
A notification was changed
Tuple Fields of Notification
A list of active notifications in a notification group has changed
Tuple Fields of NotificationGroup
An option changed its value
Tuple Fields of Option
0: UpdateOption
Information about a poll was updated; for bots only
Tuple Fields of Poll
0: UpdatePoll
The list of recently used stickers was updated
Tuple Fields of RecentStickers
The list of saved animations was updated
Tuple Fields of SavedAnimations
Notification settings for some type of chats were updated
Tuple Fields of ScopeNotificationSettings
Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the client
Tuple Fields of SecretChat
The selected background has changed
Tuple Fields of SelectedBackground
Service notification from the server. Upon receiving this the client must show a popup with the content of the notification
Tuple Fields of ServiceNotification
Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the client
Tuple Fields of Supergroup
Some data from supergroupFullInfo has been changed
Tuple Fields of SupergroupFullInfo
New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method should be called with the reason “Decline ToS update”
Tuple Fields of TermsOfService
The list of trending sticker sets was updated or some of them were viewed
Tuple Fields of TrendingStickerSets
Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if a message database is used
Tuple Fields of UnreadChatCount
Number of unread messages has changed. This update is sent only if a message database is used
Tuple Fields of UnreadMessageCount
Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the client
Tuple Fields of User
0: UpdateUser
User activity in the chat has changed
Tuple Fields of UserChatAction
Some data from userFullInfo has been changed
Tuple Fields of UserFullInfo
Some privacy setting rules have been changed
Tuple Fields of UserPrivacySettingRules
The user went online or offline
Tuple Fields of UserStatus
Implementations
pub fn on_chat_default_disable_notification<F: FnOnce(&UpdateChatDefaultDisableNotification)>(
&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_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_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_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_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_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_chat_default_disable_notification(
&self
) -> Option<&UpdateChatDefaultDisableNotification>
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