[−][src]Struct telegram_client::listener::Listener
Telegram client event listener
Implementations
impl Listener[src]
pub fn new() -> Self[src]
pub fn on_receive<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &String)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &String)) -> TGResult<()> + Send + Sync + 'static,
when receive data from tdlib
pub fn on_exception<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &TGError)) + Send + Sync + 'static, [src]
F: Fn((&Api, &TGError)) + Send + Sync + 'static,
when telegram client throw exception
pub fn on_test_use_update<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &TestUseUpdate)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &TestUseUpdate)) -> TGResult<()> + Send + Sync + 'static,
Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization
pub fn on_update_active_notifications<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateActiveNotifications)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateActiveNotifications)) -> TGResult<()> + Send + Sync + 'static,
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
pub fn on_update_authorization_state<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateAuthorizationState)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateAuthorizationState)) -> TGResult<()> + Send + Sync + 'static,
The user authorization state has changed
pub fn on_update_basic_group<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateBasicGroup)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateBasicGroup)) -> TGResult<()> + Send + Sync + 'static,
Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the client
pub fn on_update_basic_group_full_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateBasicGroupFullInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateBasicGroupFullInfo)) -> TGResult<()> + Send + Sync + 'static,
Some data from basicGroupFullInfo has been changed
pub fn on_update_call<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateCall)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateCall)) -> TGResult<()> + Send + Sync + 'static,
New call was created or information about a call was updated
pub fn on_update_chat_default_disable_notification<F>(
&mut self,
fnc: F
) -> &mut Self where
F: Fn((&Api, &UpdateChatDefaultDisableNotification)) -> TGResult<()> + Send + Sync + 'static, [src]
&mut self,
fnc: F
) -> &mut Self where
F: Fn((&Api, &UpdateChatDefaultDisableNotification)) -> TGResult<()> + Send + Sync + 'static,
The value of the default disable_notification parameter, used when a message is sent to the chat, was changed
pub fn on_update_chat_draft_message<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatDraftMessage)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatDraftMessage)) -> TGResult<()> + Send + Sync + 'static,
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
pub fn on_update_chat_is_marked_as_unread<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatIsMarkedAsUnread)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatIsMarkedAsUnread)) -> TGResult<()> + Send + Sync + 'static,
A chat was marked as unread or was read
pub fn on_update_chat_is_pinned<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatIsPinned)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatIsPinned)) -> TGResult<()> + Send + Sync + 'static,
A chat was pinned or unpinned
pub fn on_update_chat_is_sponsored<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatIsSponsored)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatIsSponsored)) -> TGResult<()> + Send + Sync + 'static,
A chat's is_sponsored field has changed
pub fn on_update_chat_last_message<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatLastMessage)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatLastMessage)) -> TGResult<()> + Send + Sync + 'static,
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
pub fn on_update_chat_notification_settings<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatNotificationSettings)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatNotificationSettings)) -> TGResult<()> + Send + Sync + 'static,
Notification settings for a chat were changed
pub fn on_update_chat_online_member_count<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatOnlineMemberCount)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatOnlineMemberCount)) -> TGResult<()> + Send + Sync + 'static,
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
pub fn on_update_chat_order<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatOrder)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatOrder)) -> TGResult<()> + Send + Sync + 'static,
The order of the chat in the chat list has changed. Instead of this update updateChatLastMessage, updateChatIsPinned or updateChatDraftMessage might be sent
pub fn on_update_chat_permissions<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatPermissions)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatPermissions)) -> TGResult<()> + Send + Sync + 'static,
Chat permissions was changed
pub fn on_update_chat_photo<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatPhoto)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatPhoto)) -> TGResult<()> + Send + Sync + 'static,
A chat photo was changed
pub fn on_update_chat_pinned_message<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatPinnedMessage)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatPinnedMessage)) -> TGResult<()> + Send + Sync + 'static,
The chat pinned message was changed
pub fn on_update_chat_read_inbox<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatReadInbox)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatReadInbox)) -> TGResult<()> + Send + Sync + 'static,
Incoming messages were read or number of unread messages has been changed
pub fn on_update_chat_read_outbox<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatReadOutbox)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatReadOutbox)) -> TGResult<()> + Send + Sync + 'static,
Outgoing messages were read
pub fn on_update_chat_reply_markup<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatReplyMarkup)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatReplyMarkup)) -> TGResult<()> + Send + Sync + 'static,
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
pub fn on_update_chat_title<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatTitle)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatTitle)) -> TGResult<()> + Send + Sync + 'static,
The title of a chat was changed
pub fn on_update_chat_unread_mention_count<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateChatUnreadMentionCount)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateChatUnreadMentionCount)) -> TGResult<()> + Send + Sync + 'static,
The chat unread_mention_count has changed
pub fn on_update_connection_state<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateConnectionState)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateConnectionState)) -> TGResult<()> + Send + Sync + 'static,
The connection state has changed
pub fn on_update_delete_messages<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateDeleteMessages)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateDeleteMessages)) -> TGResult<()> + Send + Sync + 'static,
Some messages were deleted
pub fn on_update_favorite_stickers<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateFavoriteStickers)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateFavoriteStickers)) -> TGResult<()> + Send + Sync + 'static,
The list of favorite stickers was updated
pub fn on_update_file<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateFile)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateFile)) -> TGResult<()> + Send + Sync + 'static,
Information about a file was updated
pub fn on_update_file_generation_start<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateFileGenerationStart)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateFileGenerationStart)) -> TGResult<()> + Send + Sync + 'static,
The file generation process needs to be started by the client
pub fn on_update_file_generation_stop<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateFileGenerationStop)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateFileGenerationStop)) -> TGResult<()> + Send + Sync + 'static,
File generation is no longer needed
pub fn on_update_have_pending_notifications<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateHavePendingNotifications)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateHavePendingNotifications)) -> TGResult<()> + Send + Sync + 'static,
Describes, whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications
pub fn on_update_installed_sticker_sets<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateInstalledStickerSets)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateInstalledStickerSets)) -> TGResult<()> + Send + Sync + 'static,
The list of installed sticker sets was updated
pub fn on_update_language_pack_strings<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateLanguagePackStrings)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateLanguagePackStrings)) -> TGResult<()> + Send + Sync + 'static,
Some language pack strings have been updated
pub fn on_update_message_content<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateMessageContent)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateMessageContent)) -> TGResult<()> + Send + Sync + 'static,
The message content has changed
pub fn on_update_message_content_opened<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateMessageContentOpened)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateMessageContentOpened)) -> TGResult<()> + Send + Sync + 'static,
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
pub fn on_update_message_edited<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateMessageEdited)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateMessageEdited)) -> TGResult<()> + Send + Sync + 'static,
A message was edited. Changes in the message content will come in a separate updateMessageContent
pub fn on_update_message_mention_read<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateMessageMentionRead)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateMessageMentionRead)) -> TGResult<()> + Send + Sync + 'static,
A message with an unread mention was read
pub fn on_update_message_send_acknowledged<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateMessageSendAcknowledged)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateMessageSendAcknowledged)) -> TGResult<()> + Send + Sync + 'static,
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
pub fn on_update_message_send_failed<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateMessageSendFailed)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateMessageSendFailed)) -> TGResult<()> + Send + Sync + 'static,
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
pub fn on_update_message_send_succeeded<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateMessageSendSucceeded)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateMessageSendSucceeded)) -> TGResult<()> + Send + Sync + 'static,
A message has been successfully sent
pub fn on_update_message_views<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateMessageViews)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateMessageViews)) -> TGResult<()> + Send + Sync + 'static,
The view count of the message has changed
pub fn on_update_new_callback_query<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateNewCallbackQuery)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateNewCallbackQuery)) -> TGResult<()> + Send + Sync + 'static,
A new incoming callback query; for bots only
pub fn on_update_new_chat<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateNewChat)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateNewChat)) -> TGResult<()> + Send + Sync + 'static,
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
pub fn on_update_new_chosen_inline_result<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateNewChosenInlineResult)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateNewChosenInlineResult)) -> TGResult<()> + Send + Sync + 'static,
The user has chosen a result of an inline query; for bots only
pub fn on_update_new_custom_event<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateNewCustomEvent)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateNewCustomEvent)) -> TGResult<()> + Send + Sync + 'static,
A new incoming event; for bots only
pub fn on_update_new_custom_query<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateNewCustomQuery)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateNewCustomQuery)) -> TGResult<()> + Send + Sync + 'static,
A new incoming query; for bots only
pub fn on_update_new_inline_callback_query<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateNewInlineCallbackQuery)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateNewInlineCallbackQuery)) -> TGResult<()> + Send + Sync + 'static,
A new incoming callback query from a message sent via a bot; for bots only
pub fn on_update_new_inline_query<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateNewInlineQuery)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateNewInlineQuery)) -> TGResult<()> + Send + Sync + 'static,
A new incoming inline query; for bots only
pub fn on_update_new_message<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateNewMessage)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateNewMessage)) -> TGResult<()> + Send + Sync + 'static,
A new message was received; can also be an outgoing message
pub fn on_update_new_pre_checkout_query<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateNewPreCheckoutQuery)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateNewPreCheckoutQuery)) -> TGResult<()> + Send + Sync + 'static,
A new incoming pre-checkout query; for bots only. Contains full information about a checkout
pub fn on_update_new_shipping_query<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateNewShippingQuery)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateNewShippingQuery)) -> TGResult<()> + Send + Sync + 'static,
A new incoming shipping query; for bots only. Only for invoices with flexible price
pub fn on_update_notification<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateNotification)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateNotification)) -> TGResult<()> + Send + Sync + 'static,
A notification was changed
pub fn on_update_notification_group<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateNotificationGroup)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateNotificationGroup)) -> TGResult<()> + Send + Sync + 'static,
A list of active notifications in a notification group has changed
pub fn on_update_option<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateOption)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateOption)) -> TGResult<()> + Send + Sync + 'static,
An option changed its value
pub fn on_update_poll<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdatePoll)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdatePoll)) -> TGResult<()> + Send + Sync + 'static,
Information about a poll was updated; for bots only
pub fn on_update_recent_stickers<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateRecentStickers)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateRecentStickers)) -> TGResult<()> + Send + Sync + 'static,
The list of recently used stickers was updated
pub fn on_update_saved_animations<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateSavedAnimations)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateSavedAnimations)) -> TGResult<()> + Send + Sync + 'static,
The list of saved animations was updated
pub fn on_update_scope_notification_settings<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateScopeNotificationSettings)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateScopeNotificationSettings)) -> TGResult<()> + Send + Sync + 'static,
Notification settings for some type of chats were updated
pub fn on_update_secret_chat<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateSecretChat)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateSecretChat)) -> TGResult<()> + Send + Sync + 'static,
Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the client
pub fn on_update_selected_background<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateSelectedBackground)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateSelectedBackground)) -> TGResult<()> + Send + Sync + 'static,
The selected background has changed
pub fn on_update_service_notification<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateServiceNotification)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateServiceNotification)) -> TGResult<()> + Send + Sync + 'static,
Service notification from the server. Upon receiving this the client must show a popup with the content of the notification
pub fn on_update_supergroup<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateSupergroup)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateSupergroup)) -> TGResult<()> + Send + Sync + 'static,
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
pub fn on_update_supergroup_full_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateSupergroupFullInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateSupergroupFullInfo)) -> TGResult<()> + Send + Sync + 'static,
Some data from supergroupFullInfo has been changed
pub fn on_update_terms_of_service<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateTermsOfService)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateTermsOfService)) -> TGResult<()> + Send + Sync + 'static,
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"
pub fn on_update_trending_sticker_sets<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateTrendingStickerSets)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateTrendingStickerSets)) -> TGResult<()> + Send + Sync + 'static,
The list of trending sticker sets was updated or some of them were viewed
pub fn on_update_unread_chat_count<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateUnreadChatCount)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateUnreadChatCount)) -> TGResult<()> + Send + Sync + 'static,
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
pub fn on_update_unread_message_count<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateUnreadMessageCount)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateUnreadMessageCount)) -> TGResult<()> + Send + Sync + 'static,
Number of unread messages has changed. This update is sent only if a message database is used
pub fn on_update_user<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateUser)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateUser)) -> TGResult<()> + Send + Sync + 'static,
Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the client
pub fn on_update_user_chat_action<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateUserChatAction)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateUserChatAction)) -> TGResult<()> + Send + Sync + 'static,
User activity in the chat has changed
pub fn on_update_user_full_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateUserFullInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateUserFullInfo)) -> TGResult<()> + Send + Sync + 'static,
Some data from userFullInfo has been changed
pub fn on_update_user_privacy_setting_rules<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateUserPrivacySettingRules)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateUserPrivacySettingRules)) -> TGResult<()> + Send + Sync + 'static,
Some privacy setting rules have been changed
pub fn on_update_user_status<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UpdateUserStatus)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UpdateUserStatus)) -> TGResult<()> + Send + Sync + 'static,
The user went online or offline
pub fn on_authorization_state<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &AuthorizationState)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &AuthorizationState)) -> TGResult<()> + Send + Sync + 'static,
Represents the current authorization state of the client
pub fn on_check_chat_username_result<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &CheckChatUsernameResult)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &CheckChatUsernameResult)) -> TGResult<()> + Send + Sync + 'static,
Represents result of checking whether a username can be set for a chat
pub fn on_json_value<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &JsonValue)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &JsonValue)) -> TGResult<()> + Send + Sync + 'static,
Represents a JSON value
pub fn on_language_pack_string_value<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &LanguagePackStringValue)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &LanguagePackStringValue)) -> TGResult<()> + Send + Sync + 'static,
Represents the value of a string in a language pack
pub fn on_log_stream<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &LogStream)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &LogStream)) -> TGResult<()> + Send + Sync + 'static,
Describes a stream to which TDLib internal log is written
pub fn on_option_value<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &OptionValue)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &OptionValue)) -> TGResult<()> + Send + Sync + 'static,
Represents the value of an option
pub fn on_passport_element<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &PassportElement)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &PassportElement)) -> TGResult<()> + Send + Sync + 'static,
Contains information about a Telegram Passport element
pub fn on_update<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Update)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Update)) -> TGResult<()> + Send + Sync + 'static,
Contains notifications about data changes
pub fn on_account_ttl<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &AccountTtl)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &AccountTtl)) -> TGResult<()> + Send + Sync + 'static,
Contains information about the period of inactivity after which the current user's account will automatically be deleted
pub fn on_animations<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Animations)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Animations)) -> TGResult<()> + Send + Sync + 'static,
Represents a list of animations
pub fn on_authentication_code_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &AuthenticationCodeInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &AuthenticationCodeInfo)) -> TGResult<()> + Send + Sync + 'static,
Information about the authentication code that was sent
pub fn on_auto_download_settings_presets<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &AutoDownloadSettingsPresets)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &AutoDownloadSettingsPresets)) -> TGResult<()> + Send + Sync + 'static,
Contains auto-download settings presets for the user
pub fn on_background<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Background)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Background)) -> TGResult<()> + Send + Sync + 'static,
Describes a chat background
pub fn on_backgrounds<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Backgrounds)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Backgrounds)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of backgrounds
pub fn on_basic_group<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &BasicGroup)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &BasicGroup)) -> TGResult<()> + Send + Sync + 'static,
Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users)
pub fn on_basic_group_full_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &BasicGroupFullInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &BasicGroupFullInfo)) -> TGResult<()> + Send + Sync + 'static,
Contains full information about a basic group
pub fn on_call_id<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &CallId)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &CallId)) -> TGResult<()> + Send + Sync + 'static,
Contains the call identifier
pub fn on_callback_query_answer<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &CallbackQueryAnswer)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &CallbackQueryAnswer)) -> TGResult<()> + Send + Sync + 'static,
Contains a bot's answer to a callback query
pub fn on_chat<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Chat)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Chat)) -> TGResult<()> + Send + Sync + 'static,
A chat. (Can be a private chat, basic group, supergroup, or secret chat)
pub fn on_chat_events<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &ChatEvents)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &ChatEvents)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of chat events
pub fn on_chat_invite_link<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &ChatInviteLink)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &ChatInviteLink)) -> TGResult<()> + Send + Sync + 'static,
Contains a chat invite link
pub fn on_chat_invite_link_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &ChatInviteLinkInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &ChatInviteLinkInfo)) -> TGResult<()> + Send + Sync + 'static,
Contains information about a chat invite link
pub fn on_chat_member<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &ChatMember)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &ChatMember)) -> TGResult<()> + Send + Sync + 'static,
A user with information about joining/leaving a chat
pub fn on_chat_members<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &ChatMembers)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &ChatMembers)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of chat members
pub fn on_chat_report_spam_state<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &ChatReportSpamState)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &ChatReportSpamState)) -> TGResult<()> + Send + Sync + 'static,
Contains information about the availability of the "Report spam" action for a chat
pub fn on_chats<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Chats)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Chats)) -> TGResult<()> + Send + Sync + 'static,
Represents a list of chats
pub fn on_connected_websites<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &ConnectedWebsites)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &ConnectedWebsites)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of websites the current user is logged in with Telegram
pub fn on_count<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Count)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Count)) -> TGResult<()> + Send + Sync + 'static,
Contains a counter
pub fn on_custom_request_result<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &CustomRequestResult)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &CustomRequestResult)) -> TGResult<()> + Send + Sync + 'static,
Contains the result of a custom request
pub fn on_database_statistics<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &DatabaseStatistics)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &DatabaseStatistics)) -> TGResult<()> + Send + Sync + 'static,
Contains database statistics
pub fn on_deep_link_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &DeepLinkInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &DeepLinkInfo)) -> TGResult<()> + Send + Sync + 'static,
Contains information about a tg:// deep link
pub fn on_email_address_authentication_code_info<F>(
&mut self,
fnc: F
) -> &mut Self where
F: Fn((&Api, &EmailAddressAuthenticationCodeInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
&mut self,
fnc: F
) -> &mut Self where
F: Fn((&Api, &EmailAddressAuthenticationCodeInfo)) -> TGResult<()> + Send + Sync + 'static,
Information about the email address authentication code that was sent
pub fn on_emojis<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Emojis)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Emojis)) -> TGResult<()> + Send + Sync + 'static,
Represents a list of emoji
pub fn on_error<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Error)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Error)) -> TGResult<()> + Send + Sync + 'static,
An object of this type can be returned on every function call, in case of an error
pub fn on_file<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &File)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &File)) -> TGResult<()> + Send + Sync + 'static,
Represents a file
pub fn on_file_part<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &FilePart)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &FilePart)) -> TGResult<()> + Send + Sync + 'static,
Contains a part of a file
pub fn on_formatted_text<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &FormattedText)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &FormattedText)) -> TGResult<()> + Send + Sync + 'static,
A text with some entities
pub fn on_found_messages<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &FoundMessages)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &FoundMessages)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of messages found by a search
pub fn on_game_high_scores<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &GameHighScores)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &GameHighScores)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of game high scores
pub fn on_hashtags<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Hashtags)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Hashtags)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of hashtags
pub fn on_http_url<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &HttpUrl)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &HttpUrl)) -> TGResult<()> + Send + Sync + 'static,
Contains an HTTP URL
pub fn on_imported_contacts<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &ImportedContacts)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &ImportedContacts)) -> TGResult<()> + Send + Sync + 'static,
Represents the result of an ImportContacts request
pub fn on_inline_query_results<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &InlineQueryResults)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &InlineQueryResults)) -> TGResult<()> + Send + Sync + 'static,
Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query
pub fn on_language_pack_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &LanguagePackInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &LanguagePackInfo)) -> TGResult<()> + Send + Sync + 'static,
Contains information about a language pack
pub fn on_language_pack_strings<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &LanguagePackStrings)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &LanguagePackStrings)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of language pack strings
pub fn on_localization_target_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &LocalizationTargetInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &LocalizationTargetInfo)) -> TGResult<()> + Send + Sync + 'static,
Contains information about the current localization target
pub fn on_log_tags<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &LogTags)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &LogTags)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of available TDLib internal log tags
pub fn on_log_verbosity_level<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &LogVerbosityLevel)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &LogVerbosityLevel)) -> TGResult<()> + Send + Sync + 'static,
Contains a TDLib internal log verbosity level
pub fn on_message<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Message)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Message)) -> TGResult<()> + Send + Sync + 'static,
Describes a message
pub fn on_message_link_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &MessageLinkInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &MessageLinkInfo)) -> TGResult<()> + Send + Sync + 'static,
Contains information about a link to a message in a chat
pub fn on_messages<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Messages)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Messages)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of messages
pub fn on_network_statistics<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &NetworkStatistics)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &NetworkStatistics)) -> TGResult<()> + Send + Sync + 'static,
A full list of available network statistic entries
pub fn on_ok<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Ok)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Ok)) -> TGResult<()> + Send + Sync + 'static,
An object of this type is returned on a successful function call for certain functions
pub fn on_order_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &OrderInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &OrderInfo)) -> TGResult<()> + Send + Sync + 'static,
Order information
pub fn on_passport_authorization_form<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &PassportAuthorizationForm)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &PassportAuthorizationForm)) -> TGResult<()> + Send + Sync + 'static,
Contains information about a Telegram Passport authorization form that was requested
pub fn on_passport_elements<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &PassportElements)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &PassportElements)) -> TGResult<()> + Send + Sync + 'static,
Contains information about saved Telegram Passport elements
pub fn on_passport_elements_with_errors<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &PassportElementsWithErrors)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &PassportElementsWithErrors)) -> TGResult<()> + Send + Sync + 'static,
Contains information about a Telegram Passport elements and corresponding errors
pub fn on_password_state<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &PasswordState)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &PasswordState)) -> TGResult<()> + Send + Sync + 'static,
Represents the current state of 2-step verification
pub fn on_payment_form<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &PaymentForm)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &PaymentForm)) -> TGResult<()> + Send + Sync + 'static,
Contains information about an invoice payment form
pub fn on_payment_receipt<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &PaymentReceipt)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &PaymentReceipt)) -> TGResult<()> + Send + Sync + 'static,
Contains information about a successful payment
pub fn on_payment_result<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &PaymentResult)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &PaymentResult)) -> TGResult<()> + Send + Sync + 'static,
Contains the result of a payment request
pub fn on_proxies<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Proxies)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Proxies)) -> TGResult<()> + Send + Sync + 'static,
Represents a list of proxy servers
pub fn on_proxy<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Proxy)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Proxy)) -> TGResult<()> + Send + Sync + 'static,
Contains information about a proxy server
pub fn on_public_message_link<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &PublicMessageLink)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &PublicMessageLink)) -> TGResult<()> + Send + Sync + 'static,
Contains a public HTTPS link to a message in a public supergroup or channel with a username
pub fn on_push_receiver_id<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &PushReceiverId)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &PushReceiverId)) -> TGResult<()> + Send + Sync + 'static,
Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification
pub fn on_recovery_email_address<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &RecoveryEmailAddress)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &RecoveryEmailAddress)) -> TGResult<()> + Send + Sync + 'static,
Contains information about the current recovery email address
pub fn on_scope_notification_settings<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &ScopeNotificationSettings)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &ScopeNotificationSettings)) -> TGResult<()> + Send + Sync + 'static,
Contains information about notification settings for several chats
pub fn on_seconds<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Seconds)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Seconds)) -> TGResult<()> + Send + Sync + 'static,
Contains a value representing a number of seconds
pub fn on_secret_chat<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &SecretChat)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &SecretChat)) -> TGResult<()> + Send + Sync + 'static,
Represents a secret chat
pub fn on_sessions<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Sessions)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Sessions)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of sessions
pub fn on_sticker_set<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &StickerSet)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &StickerSet)) -> TGResult<()> + Send + Sync + 'static,
Represents a sticker set
pub fn on_sticker_sets<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &StickerSets)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &StickerSets)) -> TGResult<()> + Send + Sync + 'static,
Represents a list of sticker sets
pub fn on_stickers<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Stickers)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Stickers)) -> TGResult<()> + Send + Sync + 'static,
Represents a list of stickers
pub fn on_storage_statistics<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &StorageStatistics)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &StorageStatistics)) -> TGResult<()> + Send + Sync + 'static,
Contains the exact storage usage statistics split by chats and file type
pub fn on_storage_statistics_fast<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &StorageStatisticsFast)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &StorageStatisticsFast)) -> TGResult<()> + Send + Sync + 'static,
Contains approximate storage usage statistics, excluding files of unknown file type
pub fn on_supergroup<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Supergroup)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Supergroup)) -> TGResult<()> + Send + Sync + 'static,
Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers
pub fn on_supergroup_full_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &SupergroupFullInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &SupergroupFullInfo)) -> TGResult<()> + Send + Sync + 'static,
Contains full information about a supergroup or channel
pub fn on_t_me_urls<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &TMeUrls)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &TMeUrls)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of t.me URLs
pub fn on_temporary_password_state<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &TemporaryPasswordState)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &TemporaryPasswordState)) -> TGResult<()> + Send + Sync + 'static,
Returns information about the availability of a temporary password, which can be used for payments
pub fn on_test_bytes<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &TestBytes)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &TestBytes)) -> TGResult<()> + Send + Sync + 'static,
A simple object containing a sequence of bytes; for testing only
pub fn on_test_int<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &TestInt)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &TestInt)) -> TGResult<()> + Send + Sync + 'static,
A simple object containing a number; for testing only
pub fn on_test_string<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &TestString)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &TestString)) -> TGResult<()> + Send + Sync + 'static,
A simple object containing a string; for testing only
pub fn on_test_vector_int<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &TestVectorInt)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &TestVectorInt)) -> TGResult<()> + Send + Sync + 'static,
A simple object containing a vector of numbers; for testing only
pub fn on_test_vector_int_object<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &TestVectorIntObject)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &TestVectorIntObject)) -> TGResult<()> + Send + Sync + 'static,
A simple object containing a vector of objects that hold a number; for testing only
pub fn on_test_vector_string<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &TestVectorString)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &TestVectorString)) -> TGResult<()> + Send + Sync + 'static,
A simple object containing a vector of strings; for testing only
pub fn on_test_vector_string_object<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &TestVectorStringObject)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &TestVectorStringObject)) -> TGResult<()> + Send + Sync + 'static,
A simple object containing a vector of objects that hold a string; for testing only
pub fn on_text<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Text)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Text)) -> TGResult<()> + Send + Sync + 'static,
Contains some text
pub fn on_text_entities<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &TextEntities)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &TextEntities)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of text entities
pub fn on_updates<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Updates)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Updates)) -> TGResult<()> + Send + Sync + 'static,
Contains a list of updates
pub fn on_user<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &User)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &User)) -> TGResult<()> + Send + Sync + 'static,
Represents a user
pub fn on_user_full_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UserFullInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UserFullInfo)) -> TGResult<()> + Send + Sync + 'static,
Contains full information about a user (except the full list of profile photos)
pub fn on_user_privacy_setting_rules<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UserPrivacySettingRules)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UserPrivacySettingRules)) -> TGResult<()> + Send + Sync + 'static,
A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed
pub fn on_user_profile_photos<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &UserProfilePhotos)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &UserProfilePhotos)) -> TGResult<()> + Send + Sync + 'static,
Contains part of the list of user photos
pub fn on_users<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &Users)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &Users)) -> TGResult<()> + Send + Sync + 'static,
Represents a list of users
pub fn on_validated_order_info<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &ValidatedOrderInfo)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &ValidatedOrderInfo)) -> TGResult<()> + Send + Sync + 'static,
Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options
pub fn on_web_page<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &WebPage)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &WebPage)) -> TGResult<()> + Send + Sync + 'static,
Describes a web page preview
pub fn on_web_page_instant_view<F>(&mut self, fnc: F) -> &mut Self where
F: Fn((&Api, &WebPageInstantView)) -> TGResult<()> + Send + Sync + 'static, [src]
F: Fn((&Api, &WebPageInstantView)) -> TGResult<()> + Send + Sync + 'static,
Describes an instant view page for a web page
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Listener
impl Send for Listener
impl Sync for Listener
impl Unpin for Listener
impl !UnwindSafe for Listener
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> 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>,