crate_to_crate_version!() { /* proc-macro */ }
Expand description

Convert the current crate version into a CrateVersion.

It uses the CARGO_PKG_VERSION_MAJOR, CARGO_PKG_VERSION_MINOR and CARGO_PKG_VERSION_PATCH environment variables to fetch the crate version. This means that the CrateVersion object will correspond to the version of the crate the macro is called in!


const Version: CrateVersion = crate_to_crate_version!();

Macro used internally in FRAME to generate the crate version for a pallet.