pub trait Custody<T: KeyMaterial>: Send + Sync {
// Required methods
fn unlock(&self) -> Result<Option<T>, KeyError>;
fn persist(&self, material: &T) -> Result<(), KeyError>;
fn forget(&self) -> Result<(), KeyError>;
fn close(&self);
}Expand description
The app’s own store for key material this device holds (E1).
Required Methods§
Sourcefn unlock(&self) -> Result<Option<T>, KeyError>
fn unlock(&self) -> Result<Option<T>, KeyError>
Called once at open; None when this device has never held T.
Retain the unlocked persistence capability until close.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".