Function cargo::util_schemas::restricted_names::validate_package_name
source · pub fn validate_package_name(name: &str, what: &str, help: &str) -> Result<()>
Expand description
Check the base requirements for a package name.
This can be used for other things than package names, to enforce some
level of sanity. Note that package names have other restrictions
elsewhere. cargo new
has a few restrictions, such as checking for
reserved names. crates.io has even more restrictions.