operator | method
Value
operator |(
- dynamic a
Returns the value if it is COk or throws an error if it is CErr Convinient operator to get the value from the result, user should ensure that the result is COk, otherwise it will throw an UnimplementedError Usage:
final res = CResult<int, String>.from(1);
final val = res | 0;
assert(val == 1);
Implementation
Value operator |(a) => this | a;