ok method

Option<T> ok()

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(:T v) => Some(v),
	Err() => None()
};