AWSResult<V extends Object?, E extends Exception> class
sealed
The result of an operation that may throw an exception.
value will return the result if it was retrieved successfully, or throw an exception if an exception occurred. See exception for more details.
- Mixed in types
- Implementers
Constructors
- AWSResult.error(E exception, [StackTrace? stackTrace])
-
Creates a failed result.
constfactory
- AWSResult.success(V value)
-
Creates a successful result.
constfactory
Properties
- exception → E?
-
The exception that occurred while attempting to retrieve the value.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- runtimeTypeName → String
-
The string value of runtimeType, saving a runtime lookup and preventing
obfuscation during web compilation.
no setterinherited
- stackTrace → StackTrace?
-
The original stack trace of exception, if provided.
no setter
- type → AWSResultType
-
Indicates if the result was a success.
no setter
- value → V
-
The value of the result, if the result was successful.
no setter
- valueOrNull → V?
-
The value of the result, or null if there was an error retrieving it.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
Serializes
this
as a JSON object.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited