pub trait Callbacks {
// Required methods
fn prompt(&self, message: &str);
fn request_public_string(&self, description: &str) -> Option<String>;
fn request_passphrase(&self, description: &str) -> Option<SecretString>;
}Expand description
Callbacks that might be triggered during encryption or decryption.
Structs that implement this trait should be given directly to the individual
Recipient or Identity implementations that require them.
Required Methods§
Sourcefn prompt(&self, message: &str)
fn prompt(&self, message: &str)
Shows a message to the user.
This can be used to prompt the user to take some physical action, such as inserting a hardware key.
Sourcefn request_public_string(&self, description: &str) -> Option<String>
fn request_public_string(&self, description: &str) -> Option<String>
Requests non-private input from the user.
To request private inputs, use Callbacks::request_passphrase.
Sourcefn request_passphrase(&self, description: &str) -> Option<SecretString>
fn request_passphrase(&self, description: &str) -> Option<SecretString>
Requests a passphrase to decrypt a key.
Implementors§
impl Callbacks for UiCallbacks
Available on crate feature
cli-common only.