pub trait Prompter {
// Required methods
fn pat(&self, accounts_url: &str) -> Result<String>;
fn wallet_mode(&self) -> Result<WalletMode>;
fn wallet_address(&self) -> Result<String>;
fn wallet_password(&self) -> Result<String>;
}Expand description
Test-seam trait covering every TTY interaction the init flow needs.
The real implementation (DialoguerPrompter) reads from the
terminal; tests inject a scripted double.
Required Methods§
Sourcefn pat(&self, accounts_url: &str) -> Result<String>
fn pat(&self, accounts_url: &str) -> Result<String>
Prompt for a user PAT (tf_user_*). accounts_url is the page
where the human can mint/copy one.
Sourcefn wallet_mode(&self) -> Result<WalletMode>
fn wallet_mode(&self) -> Result<WalletMode>
Prompt for a wallet-mode choice (BYOW / generate / skip).
Sourcefn wallet_address(&self) -> Result<String>
fn wallet_address(&self) -> Result<String>
Prompt for a 0x…-prefixed wallet address (BYOW path).
Sourcefn wallet_password(&self) -> Result<String>
fn wallet_password(&self) -> Result<String>
Prompt for a keystore password, asking for confirmation (generate path).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".