Failure<T> class
Failed result containing an error.
- Inheritance
- Available extensions
Constructors
- Failure(FKernalError error)
-
const
Properties
- data → T
-
Available on Result<
Gets the data if Success, throws if Failure.T> , provided by the ResultExtension extensionno setter - error → FKernalError
-
final
- error → FKernalError
-
Available on Result<
Gets the error if Failure, throws if Success.T> , provided by the ResultExtension extensionno setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isFailure → bool
-
Available on Result<
Returns true if this is a Failure.T> , provided by the ResultExtension extensionno setter - isSuccess → bool
-
Available on Result<
Returns true if this is a Success.T> , provided by the ResultExtension extensionno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fold<
R> (R onFailure(FKernalError), R onSuccess(T)) → R -
Available on Result<
Folds the result to a single value.T> , provided by the ResultExtension extension -
map<
R> (R mapper(T)) → Result< R> -
Available on Result<
Maps the success value to a new type.T> , provided by the ResultExtension extension -
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