necoherence/reconcile
Types
One resource where the recorded history and the world disagree.
pub type Divergence {
WorldAhead(
resource: core.ResourceId,
recorded: core.Revision,
actual: core.Revision,
)
WorldBehind(
resource: core.ResourceId,
recorded: core.Revision,
actual: core.Revision,
)
UnknownToWorld(
resource: core.ResourceId,
recorded: core.Revision,
)
}
Constructors
-
WorldAhead( resource: core.ResourceId, recorded: core.Revision, actual: core.Revision, ) -
WorldBehind( resource: core.ResourceId, recorded: core.Revision, actual: core.Revision, ) -
UnknownToWorld( resource: core.ResourceId, recorded: core.Revision, )
Closed reconciliation product. Carries no derivable boolean field.
pub type Reconciliation {
Reconciliation(
divergences: List(Divergence),
unbased: Int,
dropped: Int,
)
}
Constructors
-
Reconciliation( divergences: List(Divergence), unbased: Int, dropped: Int, )
Values
pub fn coherent(reconciliation: Reconciliation) -> Bool
Read whether the reconciliation is free of any gap.
pub fn reconcile(
bases: List(option.Option(core.Basis)),
world: core.World,
dropped: Int,
) -> Reconciliation
Reconcile the highest recorded revision per resource against world.
dropped is supplied by the caller as a value; it is not counted here.