pub trait MasterKeyCustody: Send + Sync {
// Required methods
fn unlock(&self) -> Result<Option<MasterKeyring>, KeyError>;
fn persist(&self, keyring: &MasterKeyring) -> Result<(), KeyError>;
fn forget(&self) -> Result<(), KeyError>;
}Expand description
A store’s master keyring’s custody: who unlocks it, where a newly established or rotated one is written, and how it is removed. Implemented once per protection policy (the OS keyring, a passphrase-wrapped file, an in-memory session value, or a host’s own).
Required Methods§
Sourcefn unlock(&self) -> Result<Option<MasterKeyring>, KeyError>
fn unlock(&self) -> Result<Option<MasterKeyring>, KeyError>
The store’s master keyring for this session. Ok(None) means the store
has never had one established (a fresh store before create/join) —
distinct from a failure to produce one (wrong passphrase, unreadable
backing store), which is Err.