Skip to main content

LoginFlow

Trait LoginFlow 

Source
pub trait LoginFlow: Send + Sync {
    // Required methods
    fn start<'life0, 'async_trait>(
        &'life0 self,
        debug_port: u16,
    ) -> Pin<Box<dyn Future<Output = Result<LoginProgress, ApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn status<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<LoginProgress, ApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn cancel<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<LoginProgress, ApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

What the login tools need. A trait so the tool surface can be tested without spawning a browser, the same reason crate::browser::KrApi is one.

Required Methods§

Source

fn start<'life0, 'async_trait>( &'life0 self, debug_port: u16, ) -> Pin<Box<dyn Future<Output = Result<LoginProgress, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Open a browser for the user to sign into, and return the instructions to relay.

Source

fn status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<LoginProgress, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn cancel<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<LoginProgress, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§