option

Attribute Macro option 

Source
#[option]
Expand description

Define option of command or public.

§Format

it’s similar with command. The only difference between them is the length of arguments.

#[command(sub_cmd <rs>|[os]|<rm...>|[om...] , desc)], explain:

  • sub_name: the name of sub-command you defined, it should be same as the name of command processing function
  • <rs>|[os]|<rm...>|[om...]: only one. Only four types of arguments: ,[OptionalSingle],,[OptionalMultiple]
  • desc: description of this sub-command, it’s using for display help information.

§Note

all #[option] should be placed before #[command]