[][src]Struct telegram_client::listener::Lout

pub struct Lout { /* fields omitted */ }

Get listener

Methods

impl Lout[src]

pub fn is_support<S: AsRef<str>>(&self, name: S) -> bool[src]

pub fn exception(
    &self
) -> &Option<Arc<dyn Fn((&Api, &TGError)) + Send + Sync + 'static>>
[src]

when telegram client throw exception

pub fn receive(
    &self
) -> &Option<Arc<dyn Fn((&Api, &String)) -> TGResult<()> + Send + Sync + 'static>>
[src]

when receive data from tdlib

pub fn error(
    &self
) -> &Option<Arc<dyn Fn((&Api, &Error)) -> TGResult<()> + Send + Sync + 'static>>
[src]

An object of this type can be returned on every function call, in case of an error

pub fn ok(
    &self
) -> &Option<Arc<dyn Fn((&Api, &Ok)) -> TGResult<()> + Send + Sync + 'static>>
[src]

An object of this type is returned on a successful function call for certain functions

pub fn proxy(
    &self
) -> &Option<Arc<dyn Fn((&Api, &Proxy)) -> TGResult<()> + Send + Sync + 'static>>
[src]

Contains information about a proxy server

pub fn authorization_state(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateAuthorizationState)) -> TGResult<()> + Send + Sync + 'static>>
[src]

The user authorization state has changed

pub fn new_message(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateNewMessage)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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

pub fn message_send_acknowledged(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateMessageSendAcknowledged)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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 message_send_succeeded(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateMessageSendSucceeded)) -> TGResult<()> + Send + Sync + 'static>>
[src]

A message has been successfully sent

pub fn message_send_failed(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateMessageSendFailed)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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 message_content(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateMessageContent)) -> TGResult<()> + Send + Sync + 'static>>
[src]

The message content has changed

pub fn message_edited(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateMessageEdited)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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

pub fn message_views(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateMessageViews)) -> TGResult<()> + Send + Sync + 'static>>
[src]

The view count of the message has changed

pub fn message_content_opened(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateMessageContentOpened)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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 message_mention_read(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateMessageMentionRead)) -> TGResult<()> + Send + Sync + 'static>>
[src]

A message with an unread mention was read

pub fn new_chat(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateNewChat)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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 chat_title(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatTitle)) -> TGResult<()> + Send + Sync + 'static>>
[src]

The title of a chat was changed

pub fn chat_photo(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatPhoto)) -> TGResult<()> + Send + Sync + 'static>>
[src]

A chat photo was changed

pub fn chat_last_message(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatLastMessage)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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 chat_order(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatOrder)) -> TGResult<()> + Send + Sync + 'static>>
[src]

The order of the chat in the chats list has changed. Instead of this update updateChatLastMessage, updateChatIsPinned or updateChatDraftMessage might be sent

pub fn chat_is_pinned(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatIsPinned)) -> TGResult<()> + Send + Sync + 'static>>
[src]

A chat was pinned or unpinned

pub fn chat_is_marked_as_unread(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatIsMarkedAsUnread)) -> TGResult<()> + Send + Sync + 'static>>
[src]

A chat was marked as unread or was read

pub fn chat_is_sponsored(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatIsSponsored)) -> TGResult<()> + Send + Sync + 'static>>
[src]

A chat's is_sponsored field has changed

pub fn chat_default_disable_notification(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatDefaultDisableNotification)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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

pub fn chat_read_inbox(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatReadInbox)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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

pub fn chat_read_outbox(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatReadOutbox)) -> TGResult<()> + Send + Sync + 'static>>
[src]

Outgoing messages were read

pub fn chat_unread_mention_count(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatUnreadMentionCount)) -> TGResult<()> + Send + Sync + 'static>>
[src]

The chat unread_mention_count has changed

pub fn chat_notification_settings(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatNotificationSettings)) -> TGResult<()> + Send + Sync + 'static>>
[src]

Notification settings for a chat were changed

pub fn scope_notification_settings(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateScopeNotificationSettings)) -> TGResult<()> + Send + Sync + 'static>>
[src]

Notification settings for some type of chats were updated

pub fn chat_reply_markup(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatReplyMarkup)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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 chat_draft_message(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateChatDraftMessage)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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 delete_messages(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateDeleteMessages)) -> TGResult<()> + Send + Sync + 'static>>
[src]

Some messages were deleted

pub fn user_chat_action(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateUserChatAction)) -> TGResult<()> + Send + Sync + 'static>>
[src]

User activity in the chat has changed

pub fn user_status(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateUserStatus)) -> TGResult<()> + Send + Sync + 'static>>
[src]

The user went online or offline

pub fn user(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateUser)) -> TGResult<()> + Send + Sync + 'static>>
[src]

Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the client

pub fn basic_group(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateBasicGroup)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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 supergroup(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateSupergroup)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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 secret_chat(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateSecretChat)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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 user_full_info(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateUserFullInfo)) -> TGResult<()> + Send + Sync + 'static>>
[src]

Some data from userFullInfo has been changed

pub fn basic_group_full_info(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateBasicGroupFullInfo)) -> TGResult<()> + Send + Sync + 'static>>
[src]

Some data from basicGroupFullInfo has been changed

pub fn supergroup_full_info(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateSupergroupFullInfo)) -> TGResult<()> + Send + Sync + 'static>>
[src]

Some data from supergroupFullInfo has been changed

pub fn service_notification(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateServiceNotification)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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

pub fn file(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateFile)) -> TGResult<()> + Send + Sync + 'static>>
[src]

Information about a file was updated

pub fn file_generation_start(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateFileGenerationStart)) -> TGResult<()> + Send + Sync + 'static>>
[src]

The file generation process needs to be started by the client

pub fn file_generation_stop(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateFileGenerationStop)) -> TGResult<()> + Send + Sync + 'static>>
[src]

File generation is no longer needed

pub fn call(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateCall)) -> TGResult<()> + Send + Sync + 'static>>
[src]

New call was created or information about a call was updated

pub fn user_privacy_setting_rules(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateUserPrivacySettingRules)) -> TGResult<()> + Send + Sync + 'static>>
[src]

Some privacy setting rules have been changed

pub fn unread_message_count(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateUnreadMessageCount)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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

pub fn unread_chat_count(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateUnreadChatCount)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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 option(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateOption)) -> TGResult<()> + Send + Sync + 'static>>
[src]

An option changed its value

pub fn installed_sticker_sets(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateInstalledStickerSets)) -> TGResult<()> + Send + Sync + 'static>>
[src]

The list of installed sticker sets was updated

pub fn trending_sticker_sets(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateTrendingStickerSets)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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

pub fn recent_stickers(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateRecentStickers)) -> TGResult<()> + Send + Sync + 'static>>
[src]

The list of recently used stickers was updated

pub fn favorite_stickers(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateFavoriteStickers)) -> TGResult<()> + Send + Sync + 'static>>
[src]

The list of favorite stickers was updated

pub fn saved_animations(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateSavedAnimations)) -> TGResult<()> + Send + Sync + 'static>>
[src]

The list of saved animations was updated

pub fn language_pack_strings(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateLanguagePackStrings)) -> TGResult<()> + Send + Sync + 'static>>
[src]

Some language pack strings have been updated

pub fn connection_state(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateConnectionState)) -> TGResult<()> + Send + Sync + 'static>>
[src]

The connection state has changed

pub fn terms_of_service(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateTermsOfService)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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 new_inline_query(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateNewInlineQuery)) -> TGResult<()> + Send + Sync + 'static>>
[src]

A new incoming inline query; for bots only

pub fn new_chosen_inline_result(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateNewChosenInlineResult)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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

pub fn new_callback_query(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateNewCallbackQuery)) -> TGResult<()> + Send + Sync + 'static>>
[src]

A new incoming callback query; for bots only

pub fn new_inline_callback_query(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateNewInlineCallbackQuery)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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

pub fn new_shipping_query(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateNewShippingQuery)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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

pub fn new_pre_checkout_query(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateNewPreCheckoutQuery)) -> TGResult<()> + Send + Sync + 'static>>
[src]

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

pub fn new_custom_event(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateNewCustomEvent)) -> TGResult<()> + Send + Sync + 'static>>
[src]

A new incoming event; for bots only

pub fn new_custom_query(
    &self
) -> &Option<Arc<dyn Fn((&Api, &UpdateNewCustomQuery)) -> TGResult<()> + Send + Sync + 'static>>
[src]

A new incoming query; for bots only

pub fn test_use_update(
    &self
) -> &Option<Arc<dyn Fn((&Api, &TestUseUpdate)) -> TGResult<()> + Send + Sync + 'static>>
[src]

Does nothing and ensures that the Update object is used; for testing only

Auto Trait Implementations

impl Send for Lout

impl Sync for Lout

impl Unpin for Lout

impl !UnwindSafe for Lout

impl !RefUnwindSafe for Lout

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]