Skip to content

_Option

[Source]

class ref _Option

Constructors

create

[Source]

new ref create(
  long': String val,
  short': (String val | None val),
  arg': (None val | StringArgument val | I64Argument val | 
    U64Argument val | F64Argument val),
  mode': (Required val | Optional val))
: _Option ref^

Parameters

Returns


Public fields

let long: String val

[Source]

Long option name.

E.g. "help" for a "--help" option.


let short: (String val | None val)

[Source]

Short option name (if any).

E.g. "h" for a "-h" option.


let arg: (None val | StringArgument val | I64Argument val |

[U64Argument](options-U64Argument) val | [F64Argument](options-F64Argument) val)

[Source]

The type of the expected argument.

None, if this option is a flag.

E.g. "--help"


let mode: (Required val | Optional val)

[Source]

determining if this Option is required or optional


Public Functions

matches

[Source]

fun box matches(
  name: String box,
  shortmatch: Bool val)
: Bool val

Parameters

Returns


has_argument

[Source]

fun box has_argument()
: Bool val

Returns


requires_argument

[Source]

fun box requires_argument()
: Bool val

Returns


accepts

[Source]

fun box accepts(
  argument: String box)
: Bool val

Parameters

Returns