pub fn update_key<F>(
path: &Path,
id: &str,
mutate: F,
) -> Result<bool, KeyStoreError>Expand description
按 id 编辑一条 key(atomic rename);闭包返回 false 代表未改动 → 跳过落盘
适用于就地修改 allowed_machines / expires_at / note 等配置,
而不想走 “revoke + regen” 流程(否则 plaintext 会换)。