ValueType

Type of the value accepted by an option or an argument.

Members

Enums

Kind
enum Kind

Kind of the value.

Functions

accepts
bool accepts(string value)

Checks whether the value is valid for this type.

expected
string expected()

Returns a description of the accepted values, e.g., an integer or one of: json, yaml.

label
string label(string name, bool colors)

Returns the choices joined by | for a choice type, otherwise the given name.

Static functions

fromString
ValueType fromString(string name)

Creates a value type from its name.

Variables

choices
string[] choices;

Allowed values if the kind is choice, otherwise empty.

kind
Kind kind;

Kind of the value.