pub trait Vault {
// Required methods
fn state(&self) -> VaultState;
fn lock(&mut self) -> SecurityResult<()>;
fn unlock(&mut self, key_material: &[u8]) -> SecurityResult<()>;
}Expand description
Minimal vault contract. This is not a remote vault protocol.
Required Methods§
Sourcefn state(&self) -> VaultState
fn state(&self) -> VaultState
Returns the current vault state.
Sourcefn lock(&mut self) -> SecurityResult<()>
fn lock(&mut self) -> SecurityResult<()>
Removes access to secret material.
Sourcefn unlock(&mut self, key_material: &[u8]) -> SecurityResult<()>
fn unlock(&mut self, key_material: &[u8]) -> SecurityResult<()>
Unlocks the vault using deployment-supplied key material.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".