CommandResult<F, R> class sealed

Result contract for command execution independent from external FP libs.

Implementers

Properties

failureOrNull → F?
Returns failure payload or null.
no setter
hashCode → int
The hash code for this object.
no setterinherited
resultOrNull → R?
Returns success payload or null.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

fold<T>({required T onFailure(F failure), required T onSuccess(R result)}) → T
Exhaustive handling for success and failure.
map<S>(S mapper(R value)) → CommandResult<F, S>
Maps only successful value preserving failure type.
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