errOpt method

Option<E> errOpt()

Converts from Result<T, E> to Option<E>.

Converts this into an Option, consuming this, and discarding the success value, if any.

Implementation

Option<E> errOpt() => isOk ? None<E>() : Some(_errValue);