randsym 0.1.1

Generates unique identifiers for macros
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 7.95 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 299.31 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • DexterHill0/randsym
    4 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • DexterHill0

randsym

Creates unique identifiers for macros.

randsym generates unique identifiers using UUID. The unique identifiers can be used to simply avoid conflicts between items that may otherwise have had the same identifier, as well as being bound to names allowing the same identifiers to be repeated.

The syntax is as follows:

  • /?/ - random identifier
  • /?@the_ident/ - random identifier bound to the name the_ident

Examples:

No binding

randsym::randsym! {
    fn /?/ () -> String {
        "I have a random name!".into()
    }
}

With binding

randsym::randsym! {
    fn /?@my_fn/ () -> String {
        "I have a random name!".into()
    }

    println!("{}", /?@my_fn/()); // "I have a random name!"
}