pub trait Prompter: Send {
// Required methods
fn prompt_username_password(
&mut self,
url: &str,
git_config: &Config,
) -> Option<(String, String)>;
fn prompt_password(
&mut self,
username: &str,
url: &str,
git_config: &Config,
) -> Option<String>;
fn prompt_ssh_key_passphrase(
&mut self,
private_key_path: &Path,
git_config: &Config,
) -> Option<String>;
}Expand description
Trait for customizing user prompts.
You can provide an implementor of this trait to customize the way a user is prompted for credentials and passphrases.
Required Methods§
Sourcefn prompt_username_password(
&mut self,
url: &str,
git_config: &Config,
) -> Option<(String, String)>
fn prompt_username_password( &mut self, url: &str, git_config: &Config, ) -> Option<(String, String)>
Promp the user for a username and password.
If the prompt fails or the user fails to provide the requested information, this function should return None.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".