(&self)
| 54 | } |
| 55 | |
| 56 | pub fn available_count(&self) -> u32 { |
| 57 | u32::try_from( |
| 58 | self.slots |
| 59 | .iter() |
| 60 | .filter(|s| s.assigned_to.is_none()) |
| 61 | .count(), |
| 62 | ) |
| 63 | .unwrap_or(u32::MAX) |
| 64 | } |
| 65 | |
| 66 | /// Assign a GPU to a sandbox. Returns the assignment details including BDF. |
| 67 | pub fn assign(&mut self, sandbox_id: &str, gpu_device: &str) -> Result<GpuAssignment, String> { |
nothing calls this directly
no outgoing calls
no test coverage detected