1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*!
# Handling of `PEP-440`
This library implements Python's Package versioning system.
Read more at <https://peps.python.org/pep-0440/>
# Usage
The `pyver` crate is available on [crates.io](https://crates.io/crates/pyver),
you can include it in your project by adding the following to your `Cargo.toml`.
```toml
[dependencies]
pyver = "1.0"
```
# Example
The following example shows how to parse a package version and
how to compare them
```
use pyver::PackageVersion;
let a = PackageVersion::new("v1.0a2.dev456").unwrap();
let b = PackageVersion::new("v1.1a2.dev457").unwrap();
assert!(a < b);
```
If you want to verify single version strings do
```
use pyver::validate_440_version;
assert!(
validate_440_version("1.0").is_ok()
);
```
*/
extern crate derivative;
// Expose validate_440_version function
pub use validate_440_version;
/// Identifiers (i.e. the components of a version string)
// Expose Ids Module
// Expose PackageVersion Struct
pub use PackageVersion;