Failure<L, R> class

Represents the failure case of an Either.

Inheritance

Constructors

Failure(L value, [StackTrace? stackTrace])
const

Properties

errorOrNull → L?
Returns the error value, or null if this is a Success.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
final
successOrNull → R?
Returns the success value, or null if this is a Failure.
no setterinherited
value → L
final

Methods

fold<T>(T onFailure(L l, StackTrace? s), T onSuccess(R r)) → T
Folds the Either into a single value.
override
getError() → (L, StackTrace?)
Returns the failure value, or throws an exception if this is a Success.
inherited
getSuccess() → R
inherited
isFailure() bool
Returns true if this is a Failure.
inherited
isSuccess() bool
Returns true if this is a Success.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onFailure(void onFailure(L l, StackTrace? s)) → void
Performs an action on the failure value.
inherited
onSuccess(void onSuccess(R r)) → void
Performs an action on the success value.
inherited
toString() String
A string representation of this object.
inherited

Operators

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