isErr property

bool isErr

Resturns true if the result is Err (failure)

Expamples

Basic usage:

Result<int, String> y = Err('An unexpected error occured');
expect(x.isErr, true);

Result<int, String> x = Ok(0);
expect(x.isErr, false);

Implementation

bool get isErr;