Enum rtdlib::types::AuthorizationState [−][src]
pub enum AuthorizationState {
Closed(AuthorizationStateClosed),
Closing(AuthorizationStateClosing),
LoggingOut(AuthorizationStateLoggingOut),
Ready(AuthorizationStateReady),
WaitCode(AuthorizationStateWaitCode),
WaitEncryptionKey(AuthorizationStateWaitEncryptionKey),
WaitPassword(AuthorizationStateWaitPassword),
WaitPhoneNumber(AuthorizationStateWaitPhoneNumber),
WaitRegistration(AuthorizationStateWaitRegistration),
WaitTdlibParameters(AuthorizationStateWaitTdlibParameters),
GetAuthorizationState(GetAuthorizationState),
// some variants omitted
}
Expand description
Represents the current authorization state of the client
Variants
TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to with error code 500. To continue working, one should create a new instance of the TDLib client
Tuple Fields of Closed
TDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received
Tuple Fields of Closing
The user is currently logging out
Tuple Fields of LoggingOut
The user has been successfully authorized. TDLib is now ready to answer queries
Tuple Fields of Ready
TDLib needs the user’s authentication code to authorize
Tuple Fields of WaitCode
TDLib needs an encryption key to decrypt the local database
Tuple Fields of WaitEncryptionKey
The user has been authorized, but needs to enter a password to start using the application
Tuple Fields of WaitPassword
TDLib needs the user’s phone number to authorize
Tuple Fields of WaitPhoneNumber
The user is unregistered and need to accept terms of service and enter their first name and last name to finish registration
Tuple Fields of WaitRegistration
TDLib needs TdlibParameters for initialization
Tuple Fields of WaitTdlibParameters
Returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state
Tuple Fields of GetAuthorizationState
Implementations
pub fn on_wait_encryption_key<F: FnOnce(&AuthorizationStateWaitEncryptionKey)>(
&self,
fnc: F
) -> &Self
pub fn on_wait_phone_number<F: FnOnce(&AuthorizationStateWaitPhoneNumber)>(
&self,
fnc: F
) -> &Self
pub fn on_wait_registration<F: FnOnce(&AuthorizationStateWaitRegistration)>(
&self,
fnc: F
) -> &Self
pub fn on_wait_tdlib_parameters<F: FnOnce(&AuthorizationStateWaitTdlibParameters)>(
&self,
fnc: F
) -> &Self
Trait Implementations
Performs the conversion.
fn deserialize<D>(deserializer: D) -> Result<AuthorizationState, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<AuthorizationState, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for AuthorizationState
impl Send for AuthorizationState
impl Sync for AuthorizationState
impl Unpin for AuthorizationState
impl UnwindSafe for AuthorizationState
Blanket Implementations
Mutably borrows from an owned value. Read more