Semantic Version Library (Ver)
Linked with the "ver" type.
Example Usage
#[main]
fn main() {
const version = 1.2.3;
assert_eq(version.major(), 1);
assert_eq(version.minor(), 2);
assert_eq(version.patch(), 3);
assert_eq(version as str, "1.2.3");
}Ver.build(ver: ver) -> str
Return the build portion of this semantic version.
const ver = 1.2.3-release+build;
assert_eq(ver.build(), "build");Ver.clear_build(ver: ver) -> void
Clear the build portion of this semantic version.
const ver = 1.2.3-release+build;
ver.clear_build();
assert_eq(ver, 1.2.3-release);Ver.clear_release(ver: ver) -> void
Clear the release portion of this semantic version.
Ver.major(ver: ver) -> int
Return the major portion of this semantic version.
Ver.minor(ver: ver) -> int
Return the minor portion of this semantic version.
Ver.patch(ver: ver) -> int
Return the patch portion of this semantic version.
Ver.release(ver: ver) -> str
Return the release portion of this semantic version.
Ver.set_build(ver: ver, val: str) -> void
Set the build portion of this semantic version.
Ver.set_major(ver: ver, val: int) -> void
Set the major portion of this semantic version.
Ver.set_minor(ver: ver, val: int) -> void
Set the minor portion of this semantic version.
Ver.set_patch(ver: ver, val: int) -> void
Set the patch portion of this semantic version.
Ver.set_release(ver: ver, val: str) -> void
Set the release portion of this semantic version.
Last updated