okOpt method

Option<T> okOpt()

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

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

Implementation

Option<T> okOpt() => isOk ? Some(_okValue) : None<T>();