pub fn version_exists_on_crates_io(
crate_name: &str,
version: &str,
) -> Result<bool>Expand description
Checks if a specific version of a crate already exists on crates.io.
Makes an HTTP request to the crates.io API to determine if the exact version is already published. Useful for skipping redundant publishes.
§Arguments
crate_name- Name of the crate to checkversion- Exact version string to check
§Examples
use sampo_core::version_exists_on_crates_io;
// Check if serde 1.0.0 exists (it does)
let exists = version_exists_on_crates_io("serde", "1.0.0").unwrap();
assert!(exists);
// Check if a fictional version exists
let exists = version_exists_on_crates_io("serde", "999.999.999").unwrap();
assert!(!exists);