pub trait KeyVault: Send + Sync {
// Required methods
fn get(&self, label: &str) -> Result<Option<Zeroizing<Vec<u8>>>>;
fn put(&self, label: &str, value: &[u8]) -> Result<()>;
fn delete(&self, label: &str) -> Result<bool>;
fn kind(&self) -> &'static str;
// Provided methods
fn labels(&self) -> Result<Vec<String>> { ... }
fn external_identity(&self, _session_id: &str) -> Option<[u8; 32]> { ... }
fn sign_external(&self, _session_id: &str, _msg: &[u8]) -> Result<[u8; 64]> { ... }
}Required Methods§
fn get(&self, label: &str) -> Result<Option<Zeroizing<Vec<u8>>>>
fn put(&self, label: &str, value: &[u8]) -> Result<()>
fn delete(&self, label: &str) -> Result<bool>
Provided Methods§
Sourcefn labels(&self) -> Result<Vec<String>>
fn labels(&self) -> Result<Vec<String>>
Every label held (for backup). A vault that cannot list says so.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".