maca / crdt-replicated-tree / CRDTree.Operation

Represents an CRDTree operation


type Operation a
    = Add Basics.Int (List Basics.Int) a
    | Delete (List Basics.Int)
    | Batch (List (Operation a))

Represents an CRDTree operation

Properties

timestamp : Operation a -> Maybe Basics.Int

Timestamp of the operation

path : Operation a -> Maybe (List Basics.Int)

Operation path

replicaId : Operation a -> Maybe Basics.Int

Id of the replica originating the operation

List

since : Basics.Int -> List (Operation a) -> List (Operation a)

Return operations since a timestamp

toList : Operation a -> List (Operation a)

Operation to List of Operations

fromList : List (Operation a) -> Operation a

List of Operations to Batch

Manipulation

merge : Operation a -> Operation a -> Operation a

Merge two operations