[−][src]Function cratesiover::query
pub fn query(crate_name: &str, version: &str) -> Result<Status, Error>
Gets the crates.io
version of the specified crate and compares it to the specified version.
Example
use cratesiover::{ query, Status }; let query = query("cratesiover", "0.1.0").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), }