Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kurtlawrence/cratesiover
Get the current published rust crate on crates.io
https://github.com/kurtlawrence/cratesiover
Last synced: about 1 month ago
JSON representation
Get the current published rust crate on crates.io
- Host: GitHub
- URL: https://github.com/kurtlawrence/cratesiover
- Owner: kurtlawrence
- Created: 2019-02-27T07:14:07.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-22T23:55:02.000Z (over 5 years ago)
- Last Synced: 2024-10-13T00:12:14.701Z (3 months ago)
- Language: Rust
- Size: 9.77 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.com/kurtlawrence/cratesiover.svg?branch=master)](https://travis-ci.com/kurtlawrence/cratesiover)
[![Latest Version](https://img.shields.io/crates/v/cratesiover.svg)](https://crates.io/crates/cratesiover)
[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/cratesiover)
[![codecov](https://codecov.io/gh/kurtlawrence/cratesiover/branch/master/graph/badge.svg)](https://codecov.io/gh/kurtlawrence/cratesiover)Query and compare the semver of a crate on crates.io.
See the [rs docs](https://docs.rs/cratesiover/). [Github repo.](https://github.com/kurtlawrence/cratesiover)
# Example
```rust
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),
}
```