Skip to main content

OutputHandler

Trait OutputHandler 

Source
pub trait OutputHandler: Send + Sync {
    // Required methods
    fn display_message(&self, message: &str);
    fn display_error(&self, error: &str);
    fn display_success(&self, message: &str);
    fn open_browser(&self, url: &Url) -> Result<()>;
    fn wait_for_input(&self, prompt: &str) -> Result<String>;
}
Expand description

Trait for handling output during authentication

Required Methods§

Source

fn display_message(&self, message: &str)

Display a message to the user

Source

fn display_error(&self, error: &str)

Display an error message

Source

fn display_success(&self, message: &str)

Display success message

Source

fn open_browser(&self, url: &Url) -> Result<()>

Open a URL in the default browser

Source

fn wait_for_input(&self, prompt: &str) -> Result<String>

Wait for user input

Implementors§