Macro memory_addr::va_range

source ·
macro_rules! va_range {
    ($range:expr) => { ... };
}
Expand description

Converts the given range expression into VirtAddrRange. Panics if the range is invalid.

§Example

use memory_addr::va_range;

let range = va_range!(0x1000..0x2000);
assert_eq!(range.start, 0x1000.into());
assert_eq!(range.end, 0x2000.into());

And this will panic:

let _ = va_range!(0x2000..0x1000);