#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

#2522 in Development tools

Download history 36/week @ 2024-07-22 24/week @ 2024-07-29 22/week @ 2024-08-05 37/week @ 2024-08-12 26/week @ 2024-08-19 26/week @ 2024-08-26 26/week @ 2024-09-02 56/week @ 2024-09-09 16/week @ 2024-09-16 28/week @ 2024-09-23 22/week @ 2024-09-30 7/week @ 2024-10-07 42/week @ 2024-10-14 9/week @ 2024-10-21 25/week @ 2024-11-04

76 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

~165KB