extended_id

Macro extended_id 

Source
macro_rules! extended_id {
    ($n:expr) => { ... };
}
Expand description

Construct an ExtendedId that is checked at compile time.

You can use any expression that can be evaluated at compile time and results in a u32.

Usage:

let id: ExtendedId = extended_id!(0x10 << 16 | 0x50);
assert!(id.as_u32() == 0x10_0050);

Will not accept invalid IDs:

let id: ExtendedId = extended_id!(0x2000_0000);