failureOrNull property

Failure? get failureOrNull

Yields the contained structured Failure representation if the operation failed; otherwise, returns null.

Implementation

Failure? get failureOrNull =>
    isFailure ? (this as _FailureResult<T>).failure : null;