Skip to main content

LoginDriver

Trait LoginDriver 

Source
pub trait LoginDriver: Send {
    // Required methods
    fn start(&mut self, phone: &Secret) -> Step;
    fn submit_code(&mut self, code: &Secret) -> Step;
    fn wait(&mut self, timeout: Duration) -> Step;
    fn cancel(&mut self);
}
Expand description

One login in a fresh isolated browser context, driven from its own thread. The phone and the code are passed in and never kept by the caller.

Required Methods§

Source

fn start(&mut self, phone: &Secret) -> Step

Begin with phone (international form).

Source

fn submit_code(&mut self, code: &Secret) -> Step

The code Grab sent.

Source

fn wait(&mut self, timeout: Duration) -> Step

Wait up to timeout for the app’s approval.

Source

fn cancel(&mut self)

Stop and dispose of the browser context (also on drop).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§