rust_ethernet_ip/
version.rs

1/// Library version information
2pub const VERSION: &str = env!("CARGO_PKG_VERSION");
3pub const NAME: &str = env!("CARGO_PKG_NAME");
4pub const DESCRIPTION: &str = env!("CARGO_PKG_DESCRIPTION");
5
6/// Major version number
7pub const MAJOR_VERSION: u32 = 0;
8
9/// Minor version number
10pub const MINOR_VERSION: u32 = 2;
11
12/// Patch version number
13pub const PATCH_VERSION: u32 = 0;
14
15/// Version string in format "v0.1.0"
16pub const VERSION_STRING: &str = concat!("v", env!("CARGO_PKG_VERSION"));
17
18/// Build date and time
19pub const BUILD_DATE: &str = env!("VERGEN_BUILD_TIMESTAMP");
20
21/// Git commit hash
22pub const GIT_HASH: &str = env!("VERGEN_GIT_SHA");
23
24/// Git commit date
25pub const GIT_COMMIT_DATE: &str = env!("VERGEN_GIT_COMMIT_TIMESTAMP");
26
27/// Git branch
28pub const GIT_BRANCH: &str = env!("VERGEN_GIT_BRANCH");
29
30/// Get the library version as a string
31pub fn get_version() -> &'static str {
32    VERSION
33}
34
35/// Get the library name
36pub fn get_name() -> &'static str {
37    NAME
38}
39
40/// Get the library description
41pub fn get_description() -> &'static str {
42    DESCRIPTION
43}