# SnapshotApplyResult

Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/snapshots/Snapshot.kt+class:androidx.compose.runtime.snapshots.SnapshotApplyResult) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0) Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  sealed class SnapshotApplyResult
  ```
Known direct subclasses [SnapshotApplyResult.Failure](https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult.Failure), [SnapshotApplyResult.Success](https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult.Failure` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success` |   |

*** ** * ** ***

The result of a applying a mutable snapshot. `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success` indicates that the snapshot was successfully applied and is now visible as the global state of the state object (or visible in the parent snapshot for a nested snapshot). `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult.Failure` indicates one or more state objects were modified by both this snapshot and in the global (or parent) snapshot, and the changes from this snapshot are **not** visible in the global or parent snapshot.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult.Failure : https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult` |
| `object https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success : https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult` |

| ### Protected constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult#SnapshotApplyResult()()` | Cmn |

| ### Public functions |
|---|---|---|
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult#check()()` Check the result of an apply. | Cmn |

| ### Public properties |
|---|---|---|
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult#succeeded()` True if the result is `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success`. | Cmn |

## Protected constructors

### SnapshotApplyResult

Cmn

```
protected SnapshotApplyResult()
```

## Public functions

### check

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
abstract fun check(): Unit
```

Check the result of an apply. If the result is `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success` then this does does nothing. If the result is `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult.Failure` then a `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyConflictException` exception is thrown. Once `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult#check()` as been called the snapshot is disposed.

## Public properties

### succeeded

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
abstract val succeeded: Boolean
```

True if the result is `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/SnapshotApplyResult.Success`.