ARDK for Android/com.nianticlabs.ardk/AsyncResult
AsyncResult
sealed class AsyncResult<out TData, out TError : ErrorCodeProvider>
Represents the final result of a completed asynchronous operation, which can either be a success, a failure, or a timeout. * This is the public-facing result type returned by suspend functions. It intentionally omits an "in-progress" state, guaranteeing that the operation has reached a terminal state.
Parameters
androidJvm
| TData | The type of the successful data. |
| TError | The type of the error code enum. |
Inheritors
| Success |
| Error |
| Timeout |
Types
| Name | Summary |
|---|---|
| Error | [androidJvm] data class Error<out TData, out TError : ErrorCodeProvider>(val code: TError) : AsyncResult<TData, TError> Represents a failed operation, containing an error code. |
| Success | [androidJvm] data class Success<out TData, out TError : ErrorCodeProvider>(val value: TData) : AsyncResult<TData, TError> Represents a successful operation, containing the resulting value. |
| Timeout | [androidJvm] object Timeout : AsyncResult<Nothing, Nothing> Represents an operation that failed because it exceeded its time limit. This is a singleton object as it carries no additional state. |