Failure<T, E> class
Constructors
-
Failure(E error)
-
const
Properties
-
error
→ E
-
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
isFailure
→ bool
-
Returns true if this constitutes a failure.
no setterinherited
-
isSuccess
→ bool
-
Returns true if this constitutes a success.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
unwrap
→ T
-
Returns the value if successful, otherwise throws the error.
no setterinherited
Methods
-
map<U>(U f(T value))
→ Result<U, E>
-
Maps the value if successful, otherwise returns the error as is.
inherited
-
match<R>(R onSuccess(T value), R onError(E error))
→ R
-
Executed providing the value if successful, or the error if failed.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited