Function

asContextElement

Return a [SnapshotContextElement] that will [enter][Snapshot.

asContextElement

Common
public fun Snapshot.asContextElement(): SnapshotContextElement

Return a SnapshotContextElement that will enter this Snapshot whenever the associated coroutine is resumed and leave this snapshot when it suspends. The snapshot still must be disposed separately when it will no longer be used.