isSome method

bool isSome()

Returns whether or not this Option holds a value (Some).

See also: Rust: Option::is_some()

Implementation

bool isSome() {
  return switch (this) {
    Some() => true,
    None() => false,
  };
}