use-git-attribute 0.0.1

Primitive gitattributes vocabulary for RustUse
Documentation
  • Coverage
  • 100%
    24 out of 24 items documented1 out of 15 items with examples
  • Size
  • Source code size: 10.43 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 674.42 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-git
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-git-attribute

Primitive gitattributes vocabulary for RustUse.

use-git-attribute models attribute names, values, set/unset states, and pattern-plus-attributes rules. It does not read files or evaluate attributes for paths.

Basic usage

use use_git_attribute::{GitAttributeName, GitAttributeRule, GitAttributeState};

let name = GitAttributeName::new("text").expect("valid attribute name");
let rule = GitAttributeRule::new("*.rs", [(name, GitAttributeState::Set)]).expect("valid rule");

assert_eq!(rule.pattern(), "*.rs");

Scope

  • Model set, unset, value, and unspecified attribute states.
  • Model pattern plus attributes data.
  • Keep file IO and attribute evaluation out of scope.