iter method

Iterable<T> iter()

Returns an Iterable of the held value.

Yields:

  • The held T value if Some.
  • Nothing if None.

See also: Rust: Option::iter()

Implementation

Iterable<T> iter() sync* {
  switch (this) {
    case Some(:T v):
      yield v;
    case None():
      return;
  }
}