version

Crates.ioversion
lib.rsversion
version3.0.0
sourcesrc
created_at2015-01-08 15:12:17.206029
updated_at2018-03-28 10:51:31.086304
descriptionA very simple library who's job is to return the version of your crate if you're building with Cargo.
homepage
repositoryhttps://github.com/nulldatamap/version
max_upload_size
id740
size15,518
Nulldata (nulldatamap)

documentation

README

version

version is a very simple library who's job is to return the version of your crate if you're building with Cargo.

Usage:

#[macro_use]
extern crate version;

// ...

version!() // Returns something like "1.0.0"

let ver : Version = FromStr::from_str( version!() ).unwrap();

Notes:

This only works if you're building with Cargo since the macro fetches the version digits from enviroment variables set by Cargo ( CARGO_PKG_VERSION_{MAJOR, MINOR, PATCH} ).

Commit count: 14

cargo fmt