StateSnapshot

data class StateSnapshot<out T>(val revision: StateRevision, val value: T)(source)

Carries a source observation and its publication revision.

The carrier is immutable, but it does not copy or make StateSnapshot.value deeply immutable. A source must therefore publish values whose later mutation cannot change an already published observation. Equal revisions within one source denote the same logical observation; they are not a second publication that can replace the earlier value.

Type Parameters

T

the observed value type.

Constructors

Link copied to clipboard
constructor(revision: StateRevision, value: T)

Properties

Link copied to clipboard

the source-assigned non-negative revision.

Link copied to clipboard
val value: T

the observed value at StateSnapshot.revision.