Skip to content

Add ability to rename flags. #470

@WesleyAC

Description

@WesleyAC

Various functions allow interacting with the names of flags as strings (Flag::name, parser, etc). However, these currently must work with the SCREAMING_SNAKE_CASE name of the flag as it appears in the source code, which is not always desirable.

In Arti, we use bitflags for our router status flags, which have specific names assigned to them that do not match the Rust identifiers. It would be convenient to have a way of renaming flags with a attribute macro — here's where this usecase came up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions