Skip to main content

run_bounds

Function run_bounds 

pub fn run_bounds(
    doc: &mut AutoCommit,
    run: &ChangeRun,
) -> Result<(Vec<ChangeHash>, Vec<ChangeHash>, usize), RevertError>
Expand description

Both returned head sets are prefix frontiers of the document’s own causal order, so they are valid arguments to AutoCommit::diff and mean the same thing on every peer holding the same changes.

§Errors

RevertError::UnknownRun when neither end of run names a change in doc — the usual cause is a run recorded against a different document. RevertError::Inverted when the run’s end precedes its start.