pubgrub/version
Semantic version helpers used by tests and examples.
Versions are stored as a (major, minor, patch) tuple and compared
lexicographically.
Types
A semantic version tuple: major, minor, patch.
pub type SemanticVersion =
#(Int, Int, Int)
Values
pub fn bump_major(version: #(Int, Int, Int)) -> #(Int, Int, Int)
Increment the major version, resetting minor and patch.
pub fn bump_minor(version: #(Int, Int, Int)) -> #(Int, Int, Int)
Increment the minor version, resetting patch.
pub fn bump_patch(version: #(Int, Int, Int)) -> #(Int, Int, Int)
Increment the patch version.
pub fn compare(
a: #(Int, Int, Int),
b: #(Int, Int, Int),
) -> order.Order
Compare semantic versions lexicographically.
pub fn new(
major: Int,
minor: Int,
patch: Int,
) -> #(Int, Int, Int)
Construct a semantic version.
pub fn to_string(version: #(Int, Int, Int)) -> String
Render a semantic version as major.minor.patch.