FugueOp

@Serializable
sealed interface FugueOp<out V>

An operation on a Fugue sequence.

Every operation carries an id — the FugueId of the element it creates or tombstones. This is the stable sort key used for canonical serialization.

Inheritors

Types

Link copied to clipboard
@Serializable
data class Compact(val positions: Map<FugueId, FugueId>) : FugueOp<Nothing>

Records that the positions entries have been garbage-collected from the op-log.

Link copied to clipboard
@Serializable
data class Insert<V>(val id: FugueId, val value: V, val parent: FugueId, val side: FugueSide, val rightOrigin: FugueId?) : FugueOp<V>

Insert value with identity id.

Link copied to clipboard
@Serializable
data class Remove<V>(val id: FugueId) : FugueOp<V>

Tombstone the element with id.

Properties

Link copied to clipboard
abstract val id: FugueId

The FugueId of the element this operation creates or tombstones.