Convert to Option, where Ok becomes Some and Err becomes None.
Option<T> toOption() => isOk ? Some((this as Ok<T, E>).value) : const None();