Skip to main content

restore

Function restore 

pub fn restore(
    doc: &mut AutoCommit,
    heads: &[ChangeHash],
    ids: &[String],
) -> Result<usize, String>
Expand description

Bring the document back to heads as one new change: all of it, or only the items whose keys are ids (a mark, a layer, a field). Bookkeeping — what is undone, the checkpoints — stays as it is. Returns how many patches were written.

§Errors

Says when there is nothing to restore: the document already matches.