Struct nereon::Opt[][src]

pub struct Opt {
    pub node: String,
    pub short: Option<String>,
    pub long: Option<String>,
    pub env: Option<String>,
    pub flags: u32,
    pub default: Option<String>,
    pub format: Option<String>,
    pub usage: Option<String>,
}

Fields

Dot separated path of destination node for this option. eg. "root.leaf".

Short option as single character string "s" matches -s.

Long option "long" matches --long.

Environment variable to use if option not parsed from command line.

OptFlag values as u32. eg Multiple as u32 | NoArg as u32.

Value to use if not parsed from command line or environment variable.

Format the option. This is a simple string format where the first {} will be replaced by the parsed value.

Description of option used to generate the usage message.

Methods

impl Opt
[src]

Creates a new Opt instance for use with nereon_init or nereon_json

Arguments

  • node - Dot separated path of destination node for this option. eg. "root.leaf".
  • short - Short option as single character string "s" matches -s.
  • long - Long option "long" matches --long.
  • env - Environment variable to use if option not parsed from command line.
  • flags - OptFlag values as u32. eg Multiple as u32 | NoArg as u32.
  • default - Value to use if not parsed from command line or environment variable.
  • format - Format the option. This is a simple string format where the first {} will be replaced by the parsed value.
  • usage - Description of option used to generate the usage message.

Trait Implementations

impl Clone for Opt
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Opt
[src]

Formats the value using the given formatter. Read more

impl Default for Opt
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Opt

impl Sync for Opt