Skip to main content

Module sync_adapter

Module sync_adapter 

Source
Expand description

The Vault’s merge rule as the sync layer’s adapter (user_sync::adapter): the layer hands over the record’s current header and the incoming one, and this answers Applied, KeptLocal or Conflict { current } by the rules of super::sync_merge. It sees headers only, never a body: which side is current is decided by versions, what a change replaced (Header::base, signed by the origin and sealed into the body) and whether the entry is being rotated here. The tags of a conflicted entry, a union of both sides, are put together afterwards from the two bodies.

The record’s other versions are read from the layer’s own log, so a late record that this machine already has an ancestor of is not taken for a change made apart.

Structs§

VaultAdapter
The Vault’s adapter, over the layer’s log (conn) and the Vault’s rotations.

Enums§

Kind
What a record of a Vault’s collection is, by its id. One collection holds all three, and each has its own rule.

Traits§

Rotations
Whether an entry is being rotated on this machine: a new value is waiting to be confirmed, and no sync may overwrite it (spec 6.3). The Vault’s store answers this; the layer does not know.

Functions§

merge_of
What the layer is told of a Decision.