operator / method

Error operator /(
  1. dynamic a
)

Returns the error if it is CErr or throws an error if it is COk Convinient operator to get the error from the result, user should ensure that the result is CErr, otherwise it will throw an UnimplementedError Usage:

final res = CResult<int, String>.from('error');
final err = res / 0;
assert(err == 'error');

Implementation

Error operator /(a) => this / a;