pub fn lock(vault_path: &Path) -> Result<VaultLock, VaultError>Expand description
Acquire an exclusive advisory lock on the vault file.
Returns a guard that releases the lock when dropped. Use this around read-modify-write cycles to prevent concurrent writes from losing changes.