Err<T, E> class final

A failed Result.

Inheritance

Constructors

Err(E error)
Creates an Err wrapping error.
const

Properties

error → E
The failure error.
final
errorOrNull → E?
The failure error, or null when this is an Ok.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isErr → bool
Whether this is an Err result.
no setterinherited
isOk → bool
Whether this is an Ok result.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
valueOrNull → T?
The success value, or null when this is an Err.
no setterinherited

Methods

getOrThrow() → T
Returns the success value or throws the failure error. Intended for tests and explicit adapter boundaries (mirrors pi's getOrThrow).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited