Crate cargo_lookup
source ·Expand description
A library for querying Rust crate registries
§Examples
Get all info for a package:
use cargo_lookup::{Query, Result};
fn main() -> Result<()> {
let query: Query = "cargo".parse()?;
let all_package_info = query.package()?;
println!("{all_package_info:?}");
Ok(())
}
Get a specific release of a package:
use cargo_lookup::{Query, Result};
fn main() -> Result<()> {
let query: Query = "cargo@=0.2.153".parse()?;
let specific_release = query.submit()?;
println!("{specific_release:?}");
Ok(())
}
Modules§
Structs§
- A dependency of a package
- All info on a package from it’s index file, including all of it’s releases
- A query for a specific rust package based on the packages name, an option version requirement, in an optional custom index. By default,
CRATES_IO_INDEX_URL
will be used as the index - An entry for a given release version of a package
Constants§
- The default crates.io index URL
Functions§
- Get the index path for a package