Crate this_crate

Crate this_crate 

Source
Expand description

This crate provides utility macros to work with crate version information.

The two main macros are version_str! and version_tuple!. These macros return the crate version in string format and as a tuple of three u16 integers, respectively.

§Examples

use this_crate::{version_str, version_tuple};
let version = version_str!();
println!("The version is: {}", version);

let (major, minor, patch) = version_tuple!();
println!("The version is: {}.{}.{}", major, minor, patch);

§no_std

This crate is no_std compatible, so it can be used in environments without the Rust standard library.

Macros§

version_str
version_str! is a macro that returns the version string of the crate.
version_tuple
version_tuple! is a macro that returns the version of the crate as a tuple of three u16 integers: (major, minor, patch).

Type Aliases§

VersionTuple
A tuple representing the version of the crate as (major, minor, patch).