iter method

Iterable<T> iter()

Returns an Iterable of the held value.

Yields:

  • The held T value if Ok.
  • Nothing if Err.

See also: Rust: Result::iter()

Implementation

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