Crates.io | cratesiover |
lib.rs | cratesiover |
version | 2.2.1 |
source | src |
created_at | 2019-02-27 08:53:06.853843 |
updated_at | 2019-08-22 23:58:48.088385 |
description | Get crate version from crates.io |
homepage | https://github.com/kurtlawrence/cratesiover |
repository | https://github.com/kurtlawrence/cratesiover |
max_upload_size | |
id | 117534 |
size | 11,782 |
Query and compare the semver of a crate on crates.io.
See the rs docs. Github repo.
use cratesiover::Status;
let query = cratesiover::query("cratesiover", &env!("CARGO_PKG_VERSION")).unwrap();
match query {
Status::Behind(ver) => println!("crate is behind the version on crates.io {}", ver),
Status::Equal(ver) => println!("crate is equal to the version on crates.io {}", ver),
Status::Ahead(ver) => println!("crate is ahead of the version on crates.io {}", ver),
}