ok method
Converts this Result<T, E>
into an Option<T>, discarding the held error
value if this is Err.
Returns:
See also:
Rust: Result::ok()
Implementation
Option<T> ok() => switch (this) {
Ok(value: T value) => Some(value),
Err() => None()
};