# DeviceLostReason

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

*** ** * ** ***


```
class DeviceLostReason
```

<br />

*** ** * ** ***

Specifies the reason why a device was lost.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/DeviceLostReason#CallbackCancelled() = 3` Indicates the device lost callback was cancelled. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/DeviceLostReason#Destroyed() = 2` The device was explicitly destroyed. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/DeviceLostReason#FailedCreation() = 4` The device failed to be created. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/DeviceLostReason#Unknown() = 1` The reason for the device loss is unknown. |

| ### Public companion functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/DeviceLostReason#toString(kotlin.Int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

## Constants

### CallbackCancelled

```
const val CallbackCancelled = 3: Int
```

Indicates the device lost callback was cancelled. This happens if the callback is replaced or unset, or if the device is destroyed cleanly without a specific error.

### Destroyed

```
const val Destroyed = 2: Int
```

The device was explicitly destroyed.

### FailedCreation

```
const val FailedCreation = 4: Int
```

The device failed to be created.

### Unknown

```
const val Unknown = 1: Int
```

The reason for the device loss is unknown.

## Public companion functions

### toString

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

```
fun toString(value: Int): String
```