OptionParser.next
You're seeing just the function
next
, go back to OptionParser module for more information.
Specs
next(argv(), options()) :: {:ok, key :: atom(), value :: term(), argv()} | {:invalid, String.t(), String.t() | nil, argv()} | {:undefined, String.t(), String.t() | nil, argv()} | {:error, argv()}
Low-level function that parses one option.
It accepts the same options as parse/2
and parse_head/2
as both functions are built on top of this function. This function
may return:
{:ok, key, value, rest}
- the optionkey
withvalue
was successfully parsed{:invalid, key, value, rest}
- the optionkey
is invalid withvalue
(returned when the value cannot be parsed according to the switch type){:undefined, key, value, rest}
- the optionkey
is undefined (returned in strict mode when the switch is unknown or on nonexistent atoms){:error, rest}
- there are no switches at the head of the givenargv