Replace the cached inventory snapshot without resetting the cursor.
(&self, inventory: CdiGpuInventory, allow_all_devices: bool)
| 164 | |
| 165 | /// Replace the cached inventory snapshot without resetting the cursor. |
| 166 | pub fn refresh(&self, inventory: CdiGpuInventory, allow_all_devices: bool) { |
| 167 | let mut state = self |
| 168 | .state |
| 169 | .write() |
| 170 | .expect("CDI GPU selector state lock poisoned"); |
| 171 | state.inventory = inventory; |
| 172 | state.allow_all_devices = allow_all_devices; |
| 173 | } |
| 174 | |
| 175 | /// Return the cached normalized inventory snapshot. |
| 176 | #[must_use] |