Macro minor

Source
macro_rules! minor {
    () => { ... };
}
Expand description

Get the minor version of your package in a constant expression.

ยงExample

const VERSION_MINOR: u32 = const_pkg_version::minor!();

You can also limit the value to something lower than a u32. This will generate a compile error if the version is too high:

const VERSION_MINOR: u8 = const_pkg_version::minor!();