SnapshotApplyResult
sealed class SnapshotApplyResult
kotlin.Any | |
↳ | androidx.compose.runtime.snapshots.SnapshotApplyResult |
The result of a applying a mutable snapshot. Success indicates that the snapshot was successfully applied and is not visible as the global state of the state object (or visible in the parent snapshot for a nested snapshot). Failure indicates one or more state objects were modified by both this snapshot and in the global (or parent) snapshot.
Summary
Nested classes | |
---|---|
Public methods | |
---|---|
abstract Unit |
check() Check the result of an apply. |
Properties | |
---|---|
abstract Boolean |
True if the result is Success. |
Public methods
check
abstract fun check(): Unit
Check the result of an apply. If the result is Success then this does does nothing. If the result is Failure then a SnapshotApplyConflictException exception is thrown. Once check as been called the snapshot is disposed.