err property
E?
get
err
Returns the error value if this is an Err, otherwise null.
Useful for pattern matching or conditional error handling. If you need to check whether an error exists, use isErr instead for clarity. To extract the value, use ok for Ok results.
Implementation
E? get err => switch (this) {
Ok() => null,
Err(:final error) => error,
};