Skip to main content

Crate radicle_git_ref_format

Crate radicle_git_ref_format 

Source
Expand description

§Macros

Instead of providing procedural macros, like git_ref_format this crate just provides much simpler declarative macros, guarded by the feature flag macro.

§Comparison to git_ref_format

§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.

Re-exports§

pub use name::Component;
pub use name::RefStr;
pub use name::RefString;
pub use refspec::DuplicateGlob;

Modules§

lit
name
refspec

Structs§

Namespaced
A Qualified ref under a git namespace.
Options
Qualified
A fully-qualified refname.

Enums§

Error

Functions§

check_ref_format
Validate that a string slice is a valid refname.