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

TestUseUpdate

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

0: TestUseUpdate
ActiveNotifications

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

0: UpdateActiveNotifications
AuthorizationState

The user authorization state has changed

Tuple Fields of AuthorizationState

0: UpdateAuthorizationState
BasicGroup

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

0: UpdateBasicGroup
BasicGroupFullInfo

Some data from basicGroupFullInfo has been changed

Tuple Fields of BasicGroupFullInfo

0: UpdateBasicGroupFullInfo
Call

New call was created or information about a call was updated

Tuple Fields of Call

0: UpdateCall
ChatDefaultDisableNotification

The value of the default disable_notification parameter, used when a message is sent to the chat, was changed

Tuple Fields of ChatDefaultDisableNotification

0: UpdateChatDefaultDisableNotification
ChatDraftMessage

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

0: UpdateChatDraftMessage
ChatIsMarkedAsUnread

A chat was marked as unread or was read

Tuple Fields of ChatIsMarkedAsUnread

0: UpdateChatIsMarkedAsUnread
ChatIsPinned

A chat was pinned or unpinned

Tuple Fields of ChatIsPinned

0: UpdateChatIsPinned
ChatIsSponsored

A chat’s is_sponsored field has changed

Tuple Fields of ChatIsSponsored

0: UpdateChatIsSponsored
ChatLastMessage

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

0: UpdateChatLastMessage
ChatNotificationSettings

Notification settings for a chat were changed

Tuple Fields of ChatNotificationSettings

0: UpdateChatNotificationSettings
ChatOnlineMemberCount

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

0: UpdateChatOnlineMemberCount
ChatOrder

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

0: UpdateChatOrder
ChatPermissions

Chat permissions was changed

Tuple Fields of ChatPermissions

0: UpdateChatPermissions
ChatPhoto

A chat photo was changed

Tuple Fields of ChatPhoto

0: UpdateChatPhoto
ChatPinnedMessage

The chat pinned message was changed

Tuple Fields of ChatPinnedMessage

0: UpdateChatPinnedMessage
ChatReadInbox

Incoming messages were read or number of unread messages has been changed

Tuple Fields of ChatReadInbox

0: UpdateChatReadInbox
ChatReadOutbox

Outgoing messages were read

Tuple Fields of ChatReadOutbox

0: UpdateChatReadOutbox
ChatReplyMarkup

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

0: UpdateChatReplyMarkup
ChatTitle

The title of a chat was changed

Tuple Fields of ChatTitle

0: UpdateChatTitle
ChatUnreadMentionCount

The chat unread_mention_count has changed

Tuple Fields of ChatUnreadMentionCount

0: UpdateChatUnreadMentionCount
ConnectionState

The connection state has changed

Tuple Fields of ConnectionState

0: UpdateConnectionState
DeleteMessages

Some messages were deleted

Tuple Fields of DeleteMessages

0: UpdateDeleteMessages
FavoriteStickers

The list of favorite stickers was updated

Tuple Fields of FavoriteStickers

0: UpdateFavoriteStickers
File

Information about a file was updated

Tuple Fields of File

0: UpdateFile
FileGenerationStart

The file generation process needs to be started by the client

Tuple Fields of FileGenerationStart

0: UpdateFileGenerationStart
FileGenerationStop

File generation is no longer needed

Tuple Fields of FileGenerationStop

0: UpdateFileGenerationStop
HavePendingNotifications

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

0: UpdateHavePendingNotifications
InstalledStickerSets

The list of installed sticker sets was updated

Tuple Fields of InstalledStickerSets

0: UpdateInstalledStickerSets
LanguagePackStrings

Some language pack strings have been updated

Tuple Fields of LanguagePackStrings

0: UpdateLanguagePackStrings
MessageContent

The message content has changed

Tuple Fields of MessageContent

0: UpdateMessageContent
MessageContentOpened

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

0: UpdateMessageContentOpened
MessageEdited

A message was edited. Changes in the message content will come in a separate updateMessageContent

Tuple Fields of MessageEdited

0: UpdateMessageEdited
MessageMentionRead

A message with an unread mention was read

Tuple Fields of MessageMentionRead

0: UpdateMessageMentionRead
MessageSendAcknowledged

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

0: UpdateMessageSendAcknowledged
MessageSendFailed

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

0: UpdateMessageSendFailed
MessageSendSucceeded

A message has been successfully sent

Tuple Fields of MessageSendSucceeded

0: UpdateMessageSendSucceeded
MessageViews

The view count of the message has changed

Tuple Fields of MessageViews

0: UpdateMessageViews
NewCallbackQuery

A new incoming callback query; for bots only

Tuple Fields of NewCallbackQuery

0: UpdateNewCallbackQuery
NewChat

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

0: UpdateNewChat
NewChosenInlineResult

The user has chosen a result of an inline query; for bots only

Tuple Fields of NewChosenInlineResult

0: UpdateNewChosenInlineResult
NewCustomEvent

A new incoming event; for bots only

Tuple Fields of NewCustomEvent

0: UpdateNewCustomEvent
NewCustomQuery

A new incoming query; for bots only

Tuple Fields of NewCustomQuery

0: UpdateNewCustomQuery
NewInlineCallbackQuery

A new incoming callback query from a message sent via a bot; for bots only

Tuple Fields of NewInlineCallbackQuery

0: UpdateNewInlineCallbackQuery
NewInlineQuery

A new incoming inline query; for bots only

Tuple Fields of NewInlineQuery

0: UpdateNewInlineQuery
NewMessage

A new message was received; can also be an outgoing message

Tuple Fields of NewMessage

0: UpdateNewMessage
NewPreCheckoutQuery

A new incoming pre-checkout query; for bots only. Contains full information about a checkout

Tuple Fields of NewPreCheckoutQuery

0: UpdateNewPreCheckoutQuery
NewShippingQuery

A new incoming shipping query; for bots only. Only for invoices with flexible price

Tuple Fields of NewShippingQuery

0: UpdateNewShippingQuery
Notification

A notification was changed

Tuple Fields of Notification

0: UpdateNotification
NotificationGroup

A list of active notifications in a notification group has changed

Tuple Fields of NotificationGroup

0: UpdateNotificationGroup
Option

An option changed its value

Tuple Fields of Option

0: UpdateOption
Poll

Information about a poll was updated; for bots only

Tuple Fields of Poll

0: UpdatePoll
RecentStickers

The list of recently used stickers was updated

Tuple Fields of RecentStickers

0: UpdateRecentStickers
SavedAnimations

The list of saved animations was updated

Tuple Fields of SavedAnimations

0: UpdateSavedAnimations
ScopeNotificationSettings

Notification settings for some type of chats were updated

Tuple Fields of ScopeNotificationSettings

0: UpdateScopeNotificationSettings
SecretChat

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

0: UpdateSecretChat
SelectedBackground

The selected background has changed

Tuple Fields of SelectedBackground

0: UpdateSelectedBackground
ServiceNotification

Service notification from the server. Upon receiving this the client must show a popup with the content of the notification

Tuple Fields of ServiceNotification

0: UpdateServiceNotification
Supergroup

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

0: UpdateSupergroup
SupergroupFullInfo

Some data from supergroupFullInfo has been changed

Tuple Fields of SupergroupFullInfo

0: UpdateSupergroupFullInfo
TermsOfService

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

0: UpdateTermsOfService
TrendingStickerSets

The list of trending sticker sets was updated or some of them were viewed

Tuple Fields of TrendingStickerSets

0: UpdateTrendingStickerSets
UnreadChatCount

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

0: UpdateUnreadChatCount
UnreadMessageCount

Number of unread messages has changed. This update is sent only if a message database is used

Tuple Fields of UnreadMessageCount

0: UpdateUnreadMessageCount
User

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
UserChatAction

User activity in the chat has changed

Tuple Fields of UserChatAction

0: UpdateUserChatAction
UserFullInfo

Some data from userFullInfo has been changed

Tuple Fields of UserFullInfo

0: UpdateUserFullInfo
UserPrivacySettingRules

Some privacy setting rules have been changed

Tuple Fields of UserPrivacySettingRules

0: UpdateUserPrivacySettingRules
UserStatus

The user went online or offline

Tuple Fields of UserStatus

0: UpdateUserStatus

Implementations

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Return td type to json string

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.