🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

SnapshotApplyResult

The result of a applying a mutable snapshot.

Source set: Common
public sealed class SnapshotApplyResult

The result of a applying a mutable snapshot. 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). 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.

Properties

succeeded

Source set: Common
public abstract val succeeded: Boolean

True if the result is Success.

Functions

check

Source set: Common
public abstract fun check()

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.

Members

Success

Source set: Common
public object Success : SnapshotApplyResult()

Properties

succeeded

Source set: Common
override val succeeded: Boolean

Functions

check

Source set: Common
override fun check()

Check the result of a snapshot apply. Calling check on a Success result is a noop.

Failure

Source set: Common
public class Failure(public val snapshot: Snapshot) : SnapshotApplyResult()

Properties

succeeded

Source set: Common
override val succeeded: Boolean

Functions

check

Source set: Common
override fun check()

Check the result of a snapshot apply. Calling check on a Failure result throws a SnapshotApplyConflictException exception.