Macro fabric_support::crate_to_noble_version [−][src]
crate_to_noble_version!() { /* proc-macro */ }
Convert the current crate version into a NobleVersion
.
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 NobleVersion
object will correspond to the version of the crate the macro is called in!
Example
const Version: NobleVersion = crate_to_noble_version!();