pub enum InternalLinkType {
Show 25 variants
GetInternalLinkType(GetInternalLinkType),
ActiveSessions(InternalLinkTypeActiveSessions),
AuthenticationCode(InternalLinkTypeAuthenticationCode),
Background(InternalLinkTypeBackground),
BotStart(InternalLinkTypeBotStart),
BotStartInGroup(InternalLinkTypeBotStartInGroup),
ChangePhoneNumber(InternalLinkTypeChangePhoneNumber),
ChatInvite(InternalLinkTypeChatInvite),
FilterSettings(InternalLinkTypeFilterSettings),
Game(InternalLinkTypeGame),
LanguagePack(InternalLinkTypeLanguagePack),
Message(InternalLinkTypeMessage),
MessageDraft(InternalLinkTypeMessageDraft),
PassportDataRequest(InternalLinkTypePassportDataRequest),
PhoneNumberConfirmation(InternalLinkTypePhoneNumberConfirmation),
Proxy(InternalLinkTypeProxy),
PublicChat(InternalLinkTypePublicChat),
QrCodeAuthentication(InternalLinkTypeQrCodeAuthentication),
Settings(InternalLinkTypeSettings),
StickerSet(InternalLinkTypeStickerSet),
Theme(InternalLinkTypeTheme),
ThemeSettings(InternalLinkTypeThemeSettings),
UnknownDeepLink(InternalLinkTypeUnknownDeepLink),
UnsupportedProxy(InternalLinkTypeUnsupportedProxy),
VideoChat(InternalLinkTypeVideoChat),
// some variants omitted
}
Expand description
Describes an internal https://t.me or tg: link, which must be processed by the app in a special way
Variants§
GetInternalLinkType(GetInternalLinkType)
Returns information about the type of an internal link. Returns a 404 error if the link is not internal. Can be called before authorization
ActiveSessions(InternalLinkTypeActiveSessions)
The link is a link to the active sessions section of the app. Use getActiveSessions to handle the link
AuthenticationCode(InternalLinkTypeAuthenticationCode)
The link contains an authentication code. Call checkAuthenticationCode with the code if the current authorization state is authorizationStateWaitCode
Background(InternalLinkTypeBackground)
The link is a link to a background. Call searchBackground with the given background name to process the link
BotStart(InternalLinkTypeBotStart)
The link is a link to a chat with a Telegram bot. Call searchPublicChat with the given bot username, check that the user is a bot, show START button in the chat with the bot, and then call sendBotStartMessage with the given start parameter after the button is pressed
BotStartInGroup(InternalLinkTypeBotStartInGroup)
The link is a link to a Telegram bot, which is supposed to be added to a group chat. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to groups, ask the current user to select a group to add the bot to, and then call sendBotStartMessage with the given start parameter and the chosen group chat. Bots can be added to a public group only by administrators of the group
ChangePhoneNumber(InternalLinkTypeChangePhoneNumber)
The link is a link to the change phone number section of the app
ChatInvite(InternalLinkTypeChatInvite)
The link is a chat invite link. Call checkChatInviteLink with the given invite link to process the link
FilterSettings(InternalLinkTypeFilterSettings)
The link is a link to the filter settings section of the app
Game(InternalLinkTypeGame)
The link is a link to a game. Call searchPublicChat with the given bot username, check that the user is a bot, ask the current user to select a chat to send the game, and then call sendMessage with inputMessageGame
LanguagePack(InternalLinkTypeLanguagePack)
The link is a link to a language pack. Call getLanguagePackInfo with the given language pack identifier to process the link
Message(InternalLinkTypeMessage)
The link is a link to a Telegram message. Call getMessageLinkInfo with the given URL to process the link
MessageDraft(InternalLinkTypeMessageDraft)
The link contains a message draft text. A share screen needs to be shown to the user, then the chosen chat must be opened and the text is added to the input field
PassportDataRequest(InternalLinkTypePassportDataRequest)
The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the app, otherwise ignore it
PhoneNumberConfirmation(InternalLinkTypePhoneNumberConfirmation)
The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberConfirmationCode with the given hash and phone number to process the link
Proxy(InternalLinkTypeProxy)
The link is a link to a proxy. Call addProxy with the given parameters to process the link and add the proxy
PublicChat(InternalLinkTypePublicChat)
The link is a link to a chat by its username. Call searchPublicChat with the given chat username to process the link
QrCodeAuthentication(InternalLinkTypeQrCodeAuthentication)
The link can be used to login the current user on another device, but it must be scanned from QR-code using in-app camera. An alert similar to “This code can be used to allow someone to log in to your Telegram account. To confirm Telegram login, please go to Settings > Devices > Scan QR and scan the code” needs to be shown
Settings(InternalLinkTypeSettings)
The link is a link to app settings
StickerSet(InternalLinkTypeStickerSet)
The link is a link to a sticker set. Call searchStickerSet with the given sticker set name to process the link and show the sticker set
Theme(InternalLinkTypeTheme)
The link is a link to a theme. TDLib has no theme support yet
ThemeSettings(InternalLinkTypeThemeSettings)
The link is a link to the theme settings section of the app
UnknownDeepLink(InternalLinkTypeUnknownDeepLink)
The link is an unknown tg: link. Call getDeepLinkInfo to process the link
UnsupportedProxy(InternalLinkTypeUnsupportedProxy)
The link is a link to an unsupported proxy. An alert can be shown to the user
VideoChat(InternalLinkTypeVideoChat)
The link is a link to a video chat. Call searchPublicChat with the given chat username, and then joinGoupCall with the given invite hash to process the link
Implementations§
Source§impl InternalLinkType
impl InternalLinkType
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>
pub fn is_get_internal_link_type(&self) -> bool
pub fn is_active_sessions(&self) -> bool
pub fn is_authentication_code(&self) -> bool
pub fn is_background(&self) -> bool
pub fn is_bot_start(&self) -> bool
pub fn is_bot_start_in_group(&self) -> bool
pub fn is_change_phone_number(&self) -> bool
pub fn is_chat_invite(&self) -> bool
pub fn is_filter_settings(&self) -> bool
pub fn is_game(&self) -> bool
pub fn is_language_pack(&self) -> bool
pub fn is_message(&self) -> bool
pub fn is_message_draft(&self) -> bool
pub fn is_passport_data_request(&self) -> bool
pub fn is_phone_number_confirmation(&self) -> bool
pub fn is_proxy(&self) -> bool
pub fn is_public_chat(&self) -> bool
pub fn is_qr_code_authentication(&self) -> bool
pub fn is_settings(&self) -> bool
pub fn is_sticker_set(&self) -> bool
pub fn is_theme(&self) -> bool
pub fn is_theme_settings(&self) -> bool
pub fn is_unknown_deep_link(&self) -> bool
pub fn is_unsupported_proxy(&self) -> bool
pub fn is_video_chat(&self) -> bool
pub fn on_get_internal_link_type<F: FnOnce(&GetInternalLinkType)>( &self, fnc: F, ) -> &Self
pub fn on_active_sessions<F: FnOnce(&InternalLinkTypeActiveSessions)>( &self, fnc: F, ) -> &Self
pub fn on_authentication_code<F: FnOnce(&InternalLinkTypeAuthenticationCode)>( &self, fnc: F, ) -> &Self
pub fn on_background<F: FnOnce(&InternalLinkTypeBackground)>( &self, fnc: F, ) -> &Self
pub fn on_bot_start<F: FnOnce(&InternalLinkTypeBotStart)>( &self, fnc: F, ) -> &Self
pub fn on_bot_start_in_group<F: FnOnce(&InternalLinkTypeBotStartInGroup)>( &self, fnc: F, ) -> &Self
pub fn on_change_phone_number<F: FnOnce(&InternalLinkTypeChangePhoneNumber)>( &self, fnc: F, ) -> &Self
pub fn on_chat_invite<F: FnOnce(&InternalLinkTypeChatInvite)>( &self, fnc: F, ) -> &Self
pub fn on_filter_settings<F: FnOnce(&InternalLinkTypeFilterSettings)>( &self, fnc: F, ) -> &Self
pub fn on_game<F: FnOnce(&InternalLinkTypeGame)>(&self, fnc: F) -> &Self
pub fn on_language_pack<F: FnOnce(&InternalLinkTypeLanguagePack)>( &self, fnc: F, ) -> &Self
pub fn on_message<F: FnOnce(&InternalLinkTypeMessage)>(&self, fnc: F) -> &Self
pub fn on_message_draft<F: FnOnce(&InternalLinkTypeMessageDraft)>( &self, fnc: F, ) -> &Self
pub fn on_passport_data_request<F: FnOnce(&InternalLinkTypePassportDataRequest)>( &self, fnc: F, ) -> &Self
pub fn on_phone_number_confirmation<F: FnOnce(&InternalLinkTypePhoneNumberConfirmation)>( &self, fnc: F, ) -> &Self
pub fn on_proxy<F: FnOnce(&InternalLinkTypeProxy)>(&self, fnc: F) -> &Self
pub fn on_public_chat<F: FnOnce(&InternalLinkTypePublicChat)>( &self, fnc: F, ) -> &Self
pub fn on_qr_code_authentication<F: FnOnce(&InternalLinkTypeQrCodeAuthentication)>( &self, fnc: F, ) -> &Self
pub fn on_settings<F: FnOnce(&InternalLinkTypeSettings)>(&self, fnc: F) -> &Self
pub fn on_sticker_set<F: FnOnce(&InternalLinkTypeStickerSet)>( &self, fnc: F, ) -> &Self
pub fn on_theme<F: FnOnce(&InternalLinkTypeTheme)>(&self, fnc: F) -> &Self
pub fn on_theme_settings<F: FnOnce(&InternalLinkTypeThemeSettings)>( &self, fnc: F, ) -> &Self
pub fn on_unknown_deep_link<F: FnOnce(&InternalLinkTypeUnknownDeepLink)>( &self, fnc: F, ) -> &Self
pub fn on_unsupported_proxy<F: FnOnce(&InternalLinkTypeUnsupportedProxy)>( &self, fnc: F, ) -> &Self
pub fn on_video_chat<F: FnOnce(&InternalLinkTypeVideoChat)>( &self, fnc: F, ) -> &Self
pub fn as_get_internal_link_type(&self) -> Option<&GetInternalLinkType>
pub fn as_active_sessions(&self) -> Option<&InternalLinkTypeActiveSessions>
pub fn as_authentication_code( &self, ) -> Option<&InternalLinkTypeAuthenticationCode>
pub fn as_background(&self) -> Option<&InternalLinkTypeBackground>
pub fn as_bot_start(&self) -> Option<&InternalLinkTypeBotStart>
pub fn as_bot_start_in_group(&self) -> Option<&InternalLinkTypeBotStartInGroup>
pub fn as_change_phone_number( &self, ) -> Option<&InternalLinkTypeChangePhoneNumber>
pub fn as_chat_invite(&self) -> Option<&InternalLinkTypeChatInvite>
pub fn as_filter_settings(&self) -> Option<&InternalLinkTypeFilterSettings>
pub fn as_game(&self) -> Option<&InternalLinkTypeGame>
pub fn as_language_pack(&self) -> Option<&InternalLinkTypeLanguagePack>
pub fn as_message(&self) -> Option<&InternalLinkTypeMessage>
pub fn as_message_draft(&self) -> Option<&InternalLinkTypeMessageDraft>
pub fn as_passport_data_request( &self, ) -> Option<&InternalLinkTypePassportDataRequest>
pub fn as_phone_number_confirmation( &self, ) -> Option<&InternalLinkTypePhoneNumberConfirmation>
pub fn as_proxy(&self) -> Option<&InternalLinkTypeProxy>
pub fn as_public_chat(&self) -> Option<&InternalLinkTypePublicChat>
pub fn as_qr_code_authentication( &self, ) -> Option<&InternalLinkTypeQrCodeAuthentication>
pub fn as_settings(&self) -> Option<&InternalLinkTypeSettings>
pub fn as_sticker_set(&self) -> Option<&InternalLinkTypeStickerSet>
pub fn as_theme(&self) -> Option<&InternalLinkTypeTheme>
pub fn as_theme_settings(&self) -> Option<&InternalLinkTypeThemeSettings>
pub fn as_unknown_deep_link(&self) -> Option<&InternalLinkTypeUnknownDeepLink>
pub fn as_unsupported_proxy(&self) -> Option<&InternalLinkTypeUnsupportedProxy>
pub fn as_video_chat(&self) -> Option<&InternalLinkTypeVideoChat>
pub fn get_internal_link_type<T: AsRef<GetInternalLinkType>>(t: T) -> Self
pub fn active_sessions<T: AsRef<InternalLinkTypeActiveSessions>>(t: T) -> Self
pub fn authentication_code<T: AsRef<InternalLinkTypeAuthenticationCode>>( t: T, ) -> Self
pub fn background<T: AsRef<InternalLinkTypeBackground>>(t: T) -> Self
pub fn bot_start<T: AsRef<InternalLinkTypeBotStart>>(t: T) -> Self
pub fn bot_start_in_group<T: AsRef<InternalLinkTypeBotStartInGroup>>( t: T, ) -> Self
pub fn change_phone_number<T: AsRef<InternalLinkTypeChangePhoneNumber>>( t: T, ) -> Self
pub fn chat_invite<T: AsRef<InternalLinkTypeChatInvite>>(t: T) -> Self
pub fn filter_settings<T: AsRef<InternalLinkTypeFilterSettings>>(t: T) -> Self
pub fn game<T: AsRef<InternalLinkTypeGame>>(t: T) -> Self
pub fn language_pack<T: AsRef<InternalLinkTypeLanguagePack>>(t: T) -> Self
pub fn message<T: AsRef<InternalLinkTypeMessage>>(t: T) -> Self
pub fn message_draft<T: AsRef<InternalLinkTypeMessageDraft>>(t: T) -> Self
pub fn passport_data_request<T: AsRef<InternalLinkTypePassportDataRequest>>( t: T, ) -> Self
pub fn phone_number_confirmation<T: AsRef<InternalLinkTypePhoneNumberConfirmation>>( t: T, ) -> Self
pub fn proxy<T: AsRef<InternalLinkTypeProxy>>(t: T) -> Self
pub fn public_chat<T: AsRef<InternalLinkTypePublicChat>>(t: T) -> Self
pub fn qr_code_authentication<T: AsRef<InternalLinkTypeQrCodeAuthentication>>( t: T, ) -> Self
pub fn settings<T: AsRef<InternalLinkTypeSettings>>(t: T) -> Self
pub fn sticker_set<T: AsRef<InternalLinkTypeStickerSet>>(t: T) -> Self
pub fn theme<T: AsRef<InternalLinkTypeTheme>>(t: T) -> Self
pub fn theme_settings<T: AsRef<InternalLinkTypeThemeSettings>>(t: T) -> Self
pub fn unknown_deep_link<T: AsRef<InternalLinkTypeUnknownDeepLink>>( t: T, ) -> Self
pub fn unsupported_proxy<T: AsRef<InternalLinkTypeUnsupportedProxy>>( t: T, ) -> Self
pub fn video_chat<T: AsRef<InternalLinkTypeVideoChat>>(t: T) -> Self
Trait Implementations§
Source§impl AsRef<InternalLinkType> for InternalLinkType
impl AsRef<InternalLinkType> for InternalLinkType
Source§fn as_ref(&self) -> &InternalLinkType
fn as_ref(&self) -> &InternalLinkType
Source§impl Clone for InternalLinkType
impl Clone for InternalLinkType
Source§fn clone(&self) -> InternalLinkType
fn clone(&self) -> InternalLinkType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more