Skip to main content

Crate use_git_tag

Crate use_git_tag 

Source
Expand description

§use-git-tag

Primitive Git tag name vocabulary for RustUse.

use-git-tag models tag names, lightweight vs annotated tag vocabulary, and version-like tag wrappers. It does not parse tag objects or depend on a semantic-versioning parser.

§Basic usage

use use_git_tag::{GitTagKind, VersionTagName};

let version = VersionTagName::new("v1.2.3").expect("valid version-like tag");

assert_eq!(GitTagKind::Annotated.as_str(), "annotated");
assert_eq!(version.as_str(), "v1.2.3");

§Scope

  • Validate basic tag-name text.
  • Model lightweight and annotated tag labels.
  • Keep tag object parsing out of scope.

Structs§

GitTagName
A validated tag name.
VersionTagName
A version-like tag name, such as v1.2.3.

Enums§

GitTagKind
Tag storage vocabulary.
GitTagNameError
Error returned while parsing tag names.