# GPURequestCallback

Artifact: [androidx.webgpu:webgpu](https://developer.android.com/jetpack/androidx/releases/webgpu) [View Source](https://cs.android.com/search?q=file:androidx/webgpu/GPURequestCallback.kt+class:androidx.webgpu.GPURequestCallback) Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

*** ** * ** ***


```
public interface GPURequestCallback<T extends Object>
```

<br />

*** ** * ** ***

A generic callback interface for asynchronous GPU requests.

| Parameters |
|---|---|
| `<T extends https://developer.android.com/reference/java/lang/Object.html>` | The type of the successful result object. |

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/webgpu/GPURequestCallback#onError(java.lang.Exception)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Exception.html exception)` |
| `abstract void` | `https://developer.android.com/reference/androidx/webgpu/GPURequestCallback#onResult(kotlin.Any)(@https://developer.android.com/reference/androidx/annotation/NonNull T result)` |

## Public methods

### onError

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
abstract void onError(@NonNull Exception exception)
```

### onResult

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
abstract void onResult(@NonNull T result)
```