Skip to main content

rollback

Function rollback 

Source
pub fn rollback(
    run: &mut Run<'_>,
    discard_unreadable: bool,
) -> Result<Option<Vec<Refusal>>, MigrateError>
Expand description

What: The rollback. Ok(None) means it ran; Ok(Some(refusals)) means nothing was changed. Why: Three states can be undone: before the exchange (delete the new subvolume and the lock), after it (carry back, swap again, delete the new subvolume), and in between (finish the bookkeeping, then the second case).

In TS you’d write (pseudocode):

const refused = await rollback(run);