pub struct ConsoleAuthStateHandler;
๐Deprecated since 0.4.3: use ClientAuthStateHandler trait implementations bound to particular client with AuthStateHandlerProxy bound to worker
Expand description
Provides minimal implementation of AuthStateHandler
.
All required methods wait (synchronously) for stdin input
Implementationsยง
Trait Implementationsยง
Sourceยงimpl AuthStateHandler for ConsoleAuthStateHandler
impl AuthStateHandler for ConsoleAuthStateHandler
Sourceยงfn handle_wait_code<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: Box<dyn ClientAuthStateHandler>,
_wait_code: &'life1 AuthorizationStateWaitCode,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_wait_code<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: Box<dyn ClientAuthStateHandler>,
_wait_code: &'life1 AuthorizationStateWaitCode,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns wait code
Sourceยงfn handle_encryption_key<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: Box<dyn ClientAuthStateHandler>,
_wait_encryption_key: &'life1 AuthorizationStateWaitEncryptionKey,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_encryption_key<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: Box<dyn ClientAuthStateHandler>,
_wait_encryption_key: &'life1 AuthorizationStateWaitEncryptionKey,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns database encryption key
Sourceยงfn handle_wait_password<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: Box<dyn ClientAuthStateHandler>,
_wait_password: &'life1 AuthorizationStateWaitPassword,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_wait_password<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: Box<dyn ClientAuthStateHandler>,
_wait_password: &'life1 AuthorizationStateWaitPassword,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns password
Sourceยงfn handle_wait_client_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: Box<dyn ClientAuthStateHandler>,
_: &'life1 AuthorizationStateWaitPhoneNumber,
) -> Pin<Box<dyn Future<Output = ClientIdentifier> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_wait_client_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: Box<dyn ClientAuthStateHandler>,
_: &'life1 AuthorizationStateWaitPhoneNumber,
) -> Pin<Box<dyn Future<Output = ClientIdentifier> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns ClientIdentifier
Sourceยงfn handle_wait_registration<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: Box<dyn ClientAuthStateHandler>,
_wait_registration: &'life1 AuthorizationStateWaitRegistration,
) -> Pin<Box<dyn Future<Output = (String, String)> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_wait_registration<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: Box<dyn ClientAuthStateHandler>,
_wait_registration: &'life1 AuthorizationStateWaitRegistration,
) -> Pin<Box<dyn Future<Output = (String, String)> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns first_name and second_name
Sourceยงfn handle_other_device_confirmation<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: Box<dyn ClientAuthStateHandler>,
wait_device_confirmation: &'life1 AuthorizationStateWaitOtherDeviceConfirmation,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_other_device_confirmation<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: Box<dyn ClientAuthStateHandler>,
wait_device_confirmation: &'life1 AuthorizationStateWaitOtherDeviceConfirmation,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Interacts with provided link
Sourceยงimpl Clone for ConsoleAuthStateHandler
impl Clone for ConsoleAuthStateHandler
Sourceยงfn clone(&self) -> ConsoleAuthStateHandler
fn clone(&self) -> ConsoleAuthStateHandler
Returns a copy of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSourceยงimpl Debug for ConsoleAuthStateHandler
impl Debug for ConsoleAuthStateHandler
Auto Trait Implementationsยง
impl Freeze for ConsoleAuthStateHandler
impl RefUnwindSafe for ConsoleAuthStateHandler
impl Send for ConsoleAuthStateHandler
impl Sync for ConsoleAuthStateHandler
impl Unpin for ConsoleAuthStateHandler
impl UnwindSafe for ConsoleAuthStateHandler
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more