[][src]Trait rust_tdlib::client::client::AuthStateHandler

pub trait AuthStateHandler {
#[must_use]    pub fn handle_other_device_confirmation<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wait_device_confirmation: &'life1 AuthorizationStateWaitOtherDeviceConfirmation
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn handle_wait_code<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wait_code: &'life1 AuthorizationStateWaitCode
    ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn handle_encryption_key<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wait_encryption_key: &'life1 AuthorizationStateWaitEncryptionKey
    ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn handle_wait_password<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wait_password: &'life1 AuthorizationStateWaitPassword
    ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn handle_wait_phone_number<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wait_phone_number: &'life1 AuthorizationStateWaitPhoneNumber
    ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn handle_wait_registration<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wait_registration: &'life1 AuthorizationStateWaitRegistration
    ) -> Pin<Box<dyn Future<Output = (String, String)> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

AuthStateHandler trait provides methods that returns data, required for authentication It allows you to handle particular "auth states", such as WaitPassword, WaitPhoneNumber and so on.

Required methods

#[must_use]pub fn handle_other_device_confirmation<'life0, 'life1, 'async_trait>(
    &'life0 self,
    wait_device_confirmation: &'life1 AuthorizationStateWaitOtherDeviceConfirmation
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Interacts with provided link

#[must_use]pub fn handle_wait_code<'life0, 'life1, 'async_trait>(
    &'life0 self,
    wait_code: &'life1 AuthorizationStateWaitCode
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Returns wait code

#[must_use]pub fn handle_encryption_key<'life0, 'life1, 'async_trait>(
    &'life0 self,
    wait_encryption_key: &'life1 AuthorizationStateWaitEncryptionKey
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Returns database encryption key

#[must_use]pub fn handle_wait_password<'life0, 'life1, 'async_trait>(
    &'life0 self,
    wait_password: &'life1 AuthorizationStateWaitPassword
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Returns password

#[must_use]pub fn handle_wait_phone_number<'life0, 'life1, 'async_trait>(
    &'life0 self,
    wait_phone_number: &'life1 AuthorizationStateWaitPhoneNumber
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Returns phone number

#[must_use]pub fn handle_wait_registration<'life0, 'life1, 'async_trait>(
    &'life0 self,
    wait_registration: &'life1 AuthorizationStateWaitRegistration
) -> Pin<Box<dyn Future<Output = (String, String)> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Returns first_name and second_name

Loading content...

Implementors

impl AuthStateHandler for ConsoleAuthStateHandler[src]

Loading content...