err method

Option<E> err()

Converts this Result<T, E> into an Option<E>, discarding the held value if this is Ok.

Returns:

See also: Rust: Result::err()

Implementation

Option<E> err() => switch (this) {
	Ok() => None(),
	Err(:E e) => Some(e)
};