pub enum LoginState {
AwaitingCode {
phone_masked: String,
channel: Option<String>,
expires_at: i64,
error: Option<String>,
},
AwaitingApproval {
phone_masked: String,
expires_at: i64,
},
Done(Session),
Failed(String),
}Expand description
What a LoginDriver is waiting for, or how it ended. Carries no phone
number or code (only the masked phone) and redacts the session in Debug.
Variants§
AwaitingCode
A code was sent by SMS/WhatsApp: call LoginDriver::submit_code.
error is set after a rejected code (another try is allowed).
Fields
AwaitingApproval
An approval request went to the Grab app: call LoginDriver::poll.
Done(Session)
Logged in. The session holds the captured cookies; nothing was saved anywhere: persist it through your own store.
Failed(String)
Ended for good (step-up, expiry, rate limit, page error, cancel).
Implementations§
Source§impl LoginState
impl LoginState
pub fn is_terminal(&self) -> bool
Trait Implementations§
Source§impl Clone for LoginState
impl Clone for LoginState
Auto Trait Implementations§
impl Forget for LoginState
impl Freeze for LoginState
impl RefUnwindSafe for LoginState
impl Send for LoginState
impl Sync for LoginState
impl Unpin for LoginState
impl UnsafeUnpin for LoginState
impl UnwindSafe for LoginState
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