Skip to main content

SecretInputProvider

Trait SecretInputProvider 

Source
pub trait SecretInputProvider: Send + Sync {
    // Required methods
    fn read_new_account_password(
        &self,
        from_stdin: bool,
    ) -> Result<SecretString, AppError>;
    fn read_login_secrets(
        &self,
        mode: LoginSecretMode,
    ) -> Result<LoginSecrets, AppError>;

    // Provided method
    fn read_raw_secret(&self) -> Result<SecretString, AppError> { ... }
}

Required Methods§

Provided Methods§

Source

fn read_raw_secret(&self) -> Result<SecretString, AppError>

Read exact UTF-8 bytes through EOF, including line endings and empty input.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§