[][src]Function cargo_next::get_version

pub fn get_version(path: impl AsRef<Path>) -> Result<String, Error>

Returns the version inside a Cargo.toml file.

Arguments

  • path: The path to the Cargo.toml file.

Returns

The version as a String if it could be successfully extracted, otherwise an error.