macro_rules! name {
    (
        $(#[$meta:meta])*
        $name:ident
    ) => { ... };
}
Expand description

Generate a resource name

Many resources on GitHub have unique names that identify them. For example, user names are unique across the platform. Since these names can be used as identifiers, it is recommended to encode them using the Rust type system. This avoids passing them around as strings, and eventually using them in the wrong place.

The name! macro makes it easy to generate a newtype that represents a specific name.

Example

use automatons_github::name;

name!(RepositoryName);
name!(UserName);