patch

Macro patch 

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

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

ยงExample

const VERSION_PATCH: u32 = const_pkg_version::patch!();

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_PATCH: u8 = const_pkg_version::patch!();