Expand description
Query and compare the semver of a crate on crates.io.
See the rs docs. Github repo.
§Example
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),
}
Structs§
- Default
Terminal - Default
Terminal
interface
Enums§
- Error
- Errors in requesting or parsing the query.
- Status
- The comparitive status of the version query.
Each variant contains the
crates.io
version number.
Functions§
- get
- Get the
crates.io
version of the specified crate. - output
- Query and compare the crate version number. Write to stdout the status.
- output_
to_ writer - Query and compare the crate version number. Write to the given writer.
- output_
with_ term - Query and compare the crate version number. Write to the given terminal the status.
- query
- Gets the
crates.io
version of the specified crate and compares it to the specified version.