Skip to main content

GetArgs

Derive Macro GetArgs 

Source
#[derive(GetArgs)]
{
    // Attributes available to this derive:
    #[arg]
    #[command]
}
Expand description

Derive macro for the getargs crate.

Generates a parse method on your struct that consumes CLI arguments via getargs::Options and populates the struct’s fields, along with the HELP and LONG_HELP constants holding the generated short and long help texts.

§Attribute syntax

See the crate-level documentation for a full reference of supported #[arg(...)] and #[command(...)] attributes.