Option

Option contains a spec and an effective value for a given option.

class val Option

Constructors

create

new val create(
  spec': OptionSpec val,
  value': (Bool val | String val | I64 val | 
    F64 val | _StringSeq val))
: Option val^

Parameters

Returns


Public Functions

spec

fun box spec()
: OptionSpec val

Returns


bool

Returns the option value as a Bool, defaulting to false.

fun box bool()
: Bool val

Returns


string

Returns the option value as a String, defaulting to empty.

fun box string()
: String val

Returns


i64

Returns the option value as an I64, defaulting to 0.

fun box i64()
: I64 val

Returns


f64

Returns the option value as an F64, defaulting to 0.0.

fun box f64()
: F64 val

Returns


string_seq

Returns the option value as a ReadSeq[String], defaulting to empty.

fun box string_seq()
: ReadSeq[String val] val

Returns


deb_string

fun box deb_string()
: String val

Returns


Private Functions

_append

fun box _append(
  next: Option val)
: Option val

Parameters

Returns