operator ~ method
Returns the value if it is IOk or error if it is IErr Convinient operator to get the inner value from the result, Usage:
final res = IResult<int>.from(1);
int val = ~res;
assert(val == 1);
Error Usage:
enum TestErrorType implements IErrorType {
error,
}
final res = IResult<int>.from(TestErrorType.error);
String err = ~res;
assert(err is TestErrorType);
Implementation
@override
Value operator ~() => value;