pub trait PasswordProvider: Send + Sync {
// Required method
fn get_password(
&self,
key: Option<&Key<'_>>,
context: &str,
) -> Option<Cow<'_, str>>;
}Expand description
What the library calls when it needs a passphrase to unlock a secret key.
Implementations return the password as Cow<str>; it is copied into the
librnp-provided buffer before the callback returns.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".