verlib/python.rs
1//! Implement Python's versioning scheme.
2//!
3//! Python's versioning scheme is described in
4//! [PEP-440](https://www.python.org/dev/peps/pep-0440/). Contrary to semver,
5//! it allows for post-releases (`.postN`), development versions (`.devN`), and
6//! epochs (`N!` prefix). It also does not mandate any semantics, explicitly
7//! allowing date-based releases.
8//!
9//! It is unusual in that it gives meaning to specific identifiers, such as
10//! `post`, `dev`, `rc``, `a` (for alpha), and `b` (for beta).
11
12/// A PEP-440-compliant Python version number.
13#[derive(Clone, Debug)]
14pub struct PythonVersion(String);