Skip to main content

Tag

Derive Macro Tag 

Source
#[derive(Tag)]
{
    // Attributes available to this derive:
    #[tag]
}
Expand description

Declares a tag.

ⓘ
#[derive(Tag)]
#[tag(name = "users", description = "Managing user accounts")]
struct Users;

Tags are types rather than strings, so a typo is a compile error and uniqueness follows from the module system. #[tag(parent = Admin)] nests one tag under another, which requires openapi32.