split_versioned_name

Function split_versioned_name 

Source
pub fn split_versioned_name(
    full_name: &str,
) -> Result<(String, TinyVersion), SplitError>
Expand description

Splits a versioned name into its package name and version.

§Arguments

§Returns

A tuple containing the package name and the parsed TinyVersion.

§Errors

Returns a SplitError if:

  • The input does not contain a hyphen (thus, no valid separator between package and version).
  • The version part cannot be parsed as a valid TinyVersion.