Diff and encode patch operations for Emerge.Engine.Element trees.
Summary
Functions
Decode a binary command stream into patches.
Compute patches between two trees (expects numeric ids).
Encode patches into a binary command stream.
Types
@type nearby_slot() :: :behind | :above | :on_right | :below | :on_left | :in_front
@type patch() :: {:set_attrs, term(), map()} | {:set_children, term(), [term()]} | {:set_nearby_mounts, term(), [{nearby_slot(), term()}]} | {:insert_subtree, term() | nil, non_neg_integer(), Emerge.Engine.Element.t()} | {:insert_nearby_subtree, term(), non_neg_integer(), nearby_slot(), Emerge.Engine.Element.t()} | {:remove, term()}
Functions
Decode a binary command stream into patches.
@spec diff(Emerge.Engine.Element.t(), Emerge.Engine.Element.t()) :: [patch()]
Compute patches between two trees (expects numeric ids).
Encode patches into a binary command stream.