Function memory_range::overlapping_ranges

source ยท
pub fn overlapping_ranges(
    left: impl IntoIterator<Item = MemoryRange>,
    right: impl IntoIterator<Item = MemoryRange>,
) -> impl Iterator<Item = MemoryRange>
Expand description

Returns an iterator over memory ranges that are in both left and right.

For example, if left is [0..4MB, 8MB..12MB] and right is [2MB..6MB, 10MB..11MB], the resulting iterator will yield [2MB..4MB, 10MB..11MB].

Panics if left or right are not sorted or are overlapping.