Trait age_plugin::Callbacks [−][src]
pub trait Callbacks<E> {
fn message(&mut self, message: &str) -> Result<()>;
fn request_public(&mut self, message: &str) -> Result<String>;
fn request_secret(&mut self, message: &str) -> Result<SecretString>;
fn error(&mut self, error: E) -> Result<()>;
}Expand description
The interface that age plugins can use to interact with an age implementation.
Required methods
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.
fn request_public(&mut self, message: &str) -> Result<String>
fn request_public(&mut self, message: &str) -> Result<String>
Requests a non-secret value from the user.
message will be displayed to the user, providing context for the request.
To request secrets, use Callbacks::request_secret.
fn request_secret(&mut self, message: &str) -> Result<SecretString>
fn request_secret(&mut self, message: &str) -> Result<SecretString>
Requests a secret value from the user, such as a passphrase.
message will be displayed to the user, providing context for the request.