Skip to main content

Crate use_version

Crate use_version 

Source
Expand description

§use-version

Composable version and semver primitives for RustUse.

use-version provides a small typed layer over semantic versions for release planning and policy checks.

§Example

use use_version::{next_minor, parse_version};

let version = parse_version("0.1.0").unwrap();

assert_eq!(next_minor(&version).to_string(), "0.2.0");

Composable semantic-version primitives for RustUse.

Structs§

Version
A typed semantic version value.
VersionError
Errors that can occur while parsing semantic versions.

Enums§

ReleaseLevel
The release level represented by a version transition.
VersionBump
The kind of version bump to apply.
VersionPolicy
A simple version policy marker for RustUse release flows.

Functions§

compare_versions
Compares two semantic versions.
is_prerelease
Returns true when a version contains prerelease metadata.
next_major
Returns the next major version.
next_minor
Returns the next minor version.
next_patch
Returns the next patch version.
parse_version
Parses a semantic version string.