Function cargo_free::check_availability [−][src]
pub fn check_availability(name: impl AsRef<str>) -> Result<Availability, Error>
Checks the availability for a given crate name.
Arguments
name
: The crate name to check
Returns
Ok(Availability)
if the name could be resolved. If the crate name is
empty, Err(Error::EmptyCrateName)
gets returned. Returns
Err(Error::NetworkTimeout)
if a timeout occurred.
Note
The needed network request will timeout after five seconds.