Returns true if this region has the exact same memory slots as the other region.
(&self, other: &MmioRegion)
| 285 | impl MmioRegion { |
| 286 | /// Returns true if this region has the exact same memory slots as the other region. |
| 287 | pub fn has_matching_slots(&self, other: &MmioRegion) -> bool { |
| 288 | self.user_memory_regions.len() == other.user_memory_regions.len() |
| 289 | && self |
| 290 | .user_memory_regions |
| 291 | .iter() |
| 292 | .all(|u| other.user_memory_regions.iter().any(|o| o.slot == u.slot)) |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | /// # Safety |
no test coverage detected