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§
Sourcefn 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 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.