Companion

object Companion

Functions

equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
global
Link copied to clipboard
common
inline fun <T> global(block: () -> T): T
Escape the current snapshot, if there is one.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
notifyObjectsInitialized
Link copied to clipboard
common
fun notifyObjectsInitialized()
Notify the snapshot that all objects created in this snapshot to this point should be considered initialized.
observe
Link copied to clipboard
common
fun <T> observe(readObserver: SnapshotReadObserver? = null, writeObserver: SnapshotWriteObserver? = null, block: () -> T): T
Observe reads and or write of state objects in the current thread.
openSnapshotCount
Link copied to clipboard
common
fun openSnapshotCount(): Int
registerApplyObserver
Link copied to clipboard
common
fun registerApplyObserver(observer: SnapshotApplyObserver): () -> Unit
Register an apply listener that is called back when snapshots are applied to the global state.
registerGlobalWriteObserver
Link copied to clipboard
common
fun registerGlobalWriteObserver(observer: SnapshotWriteObserver): () -> Unit
Register an observer of the first write to the global state of a global state object since the last call to sendApplyNotifications.
sendApplyNotifications
Link copied to clipboard
common
fun sendApplyNotifications()
Send any pending apply notifications for state objects changed outside a snapshot.
toString
Link copied to clipboard
common
open fun toString(): String

Properties

current
Link copied to clipboard
common
val current: Snapshot
Return the thread's active snapshot.