Expand description
This crate depends on and re-exports from git_ref_format_core.
§Macros
Instead of providing procedural macros, like git_ref_format
it just provides much simpler declarative macros, guarded by the feature
flag macro.
§Benefits
- Does not depend on
radicle-git-ext. - Does not pull in procedural macro dependencies.
- Has much smaller compile-time overhead than
git_ref_format.
§Drawback
The main drawback is that the macros in this crate cannot provide compile time validation of the argument. Thus, these macros must be used in conjunction with testing: If all generated objects are used in tests, and these tests are run, then the guarantees are equally strong. Consumers that do not or cannot test their code should not use the macros then.
Modules§
Macros§
- component
- Create a
git_ref_format_core::Componentfrom a string literal. - pattern
- Create a
git_ref_format_core::refspec::PatternStringfrom a string literal. - qualified
- Create a
git_ref_format_core::Qualifiedfrom a string literal. - qualified_
pattern - Create a
git_ref_format_core::refspec::QualifiedPatternfrom a string literal. - refname
- Create a
git_ref_format_core::RefStringfrom a string literal.
Structs§
- Component
- A path component of a
RefStr. - Duplicate
Glob - Namespaced
- A
Qualifiedref under a git namespace. - Options
- Qualified
- A fully-qualified refname.
- RefStr
- RefString
Enums§
Functions§
- check_
ref_ format - Validate that a string slice is a valid refname.