pub struct Parser {
    pub flag_pattern: char,
    pub long_flag_prefix: String,
    pub eq: char,
}
Expand description

Struct of information for parse

Fields

flag_pattern: char

flag_pattern. Default is ‘-’.

long_flag_prefix: String

Long-flag pre&&fix. Default is “–”.

eq: char

equal symbol. Default is “=”

Implementations

Creates a new Parser with flag_pattern and long_flag_prefix.

Returns true if str has long-flag prefix (default prefix: –). ロングフラグか判定する

Returns true if str has flag prefix (default prefix: -). フラグならtrueを返す

Builds a new Parser with all options

Removes long-flag prefix from arg.

Gets short flag name.

Parses args and convert into MiddileArgs

Converts long_flag to MiddleArg::LongFlag.

Converts short_flag to MiddleArg::ShortFlag.

Parses c’s parsing_args (call inter mediate args in parsing).

Parses middle long flag.

Parse middle short flag

Parse middle normal arg

Parses args if next middle args exist.

Parse args until args’ end.

Parses flags start with long flag until non-flag arg appeared.

Parses flags start with short flag until args appeared.

Parses(or assigns parse functions) args if next args.

Trait Implementations

Returns the “default value” for a type. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.