operator | method

T operator |(
  1. T or
)

Returns the success value if it exists, otherwise returns or

Implementation

T operator |(
  T or,
) =>
    switch (this) {
      Success(:final value) => value,
      Error() => or,
    };