crate_version_parse 0.2.0

simply parses crate-semver from a string
Documentation
  • Coverage
  • 100%
    10 out of 10 items documented2 out of 4 items with examples
  • Size
  • Source code size: 10.01 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.93 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 22s Average build duration of successful builds.
  • all releases: 22s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • museun/crate_version_parse
    0 0 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • museun

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