#semver #parse #cargo #crates #parser #no-std

no-std crate_version_parse

simply parses crate-semver from a string

3 unstable releases

0.2.0 Feb 27, 2020
0.1.1 Feb 8, 2020
0.1.0 Feb 8, 2020

#2040 in Development tools

Download history 45/week @ 2024-04-14 30/week @ 2024-04-21 44/week @ 2024-04-28 47/week @ 2024-05-05 34/week @ 2024-05-12 26/week @ 2024-05-19 23/week @ 2024-05-26 299/week @ 2024-06-02 25/week @ 2024-06-09 26/week @ 2024-06-16 29/week @ 2024-06-23 3/week @ 2024-06-30 12/week @ 2024-07-07 21/week @ 2024-07-14 30/week @ 2024-07-21 29/week @ 2024-07-28

92 downloads per month
Used in 4 crates (via cargo-whatfeatures)

0BSD license

8KB
115 lines

crate_version_parse

Crates Documentation Actions

A crate name and version parser

Features

Example

let input = "zstd-sys-1.4.15+zstd.1.4.4";
let crate_ = CrateVersion::try_parse(input).unwrap();
assert_eq!(crate_.name, "zstd-sys");
assert_eq!(crate_.version, "1.4.15+zstd.1.4.4");

let input = "wasi-0.9.0+wasi-snapshot-preview1";
let crate_ = CrateVersion::try_parse(input).unwrap();
assert_eq!(crate_.name, "wasi");
assert_eq!(crate_.version,  "0.9.0+wasi-snapshot-preview1");

let input = "winapi-i686-pc-windows-gnu-0.4.0";
let crate_ = CrateVersion::try_parse(input).unwrap();
assert_eq!(crate_.name, "winapi-i686-pc-windows-gnu");
assert_eq!(crate_.version, "0.4.0");

License: 0BSD

Dependencies

~170KB