(op: O)
| 67 | } |
| 68 | |
| 69 | pub fn try_write<F, O>(op: O) -> Result<F, Error> |
| 70 | where O: FnOnce(&mut RwLockWriteGuard<'static, ControlDataStorage>) -> Result<F, Error> { |
| 71 | op(&mut CONTROL_DATA_STORAGE.get().expect(Self::NOT_INITIALIZED).write()) |
| 72 | } |
| 73 | |
| 74 | pub fn try_confidential_vm<F, O>(confidential_vm_id: ConfidentialVmId, op: O) -> Result<F, Error> |
| 75 | where O: FnOnce(RwLockReadGuard<'_, ConfidentialVm>) -> Result<F, Error> { |