Expand description
§version-number
§Synopsis
A crate to represent and parse two- and three-component version numbers of the form major.minor,
and major.minor.patch respectively. These version numbers are often seen within the Rust
project manifests.
§Semver compatibility
The version numbers accepted by this crate are a subset of semver version numbers,
with the exception of also allowing two component (shorthand) major.minor versions.
For example, 1.0 and 1.0.0 are both accepted by this library, while the former is
rejected by semver.
In addition Version does not accept extra labels such as build parameters, which are
an extension of the semver version number itself.
In this crate, we call a two component major.minor version number a BaseVersion, and
we call a three component major.minor.patch version number a FullVersion.
Re-exports§
pub use parsers::BaseVersionParser;pub use parsers::FullVersionParser;pub use parsers::ParserError;pub use parsers::VersionParser;
Modules§
- parsers
- This crate contains multiple parsers.
Structs§
- Base
Version - A two-component
MAJOR.MINORversion. - Full
Version - A three-component
MAJOR.MINOR.PATCHversion.
Enums§
- Error
- Top level errors for version-numbers.
- Variant
- Type used to indicate which variant of a
Versionis used. The options areBaseforVersion::Base, andFullforVersion::Full. - Version
- A numbered version which is a two-component
major.minorversion number, or a three-componentmajor.minor.patchversion number.