rust/hg-core/src/transaction.rs
author Arseniy Alekseyev <aalekseyev@janestreet.com>
Mon, 02 Dec 2024 11:25:26 +0000
changeset 52352 2ff004fb491c
parent 52160 e01e84e5e426
permissions -rw-r--r--
hgignore: add a GlobSuffix type, instead of passing byte arrays I think this makes it easier to understand the purpose of this extra argument.

use std::path::Path;

/// The Mercurial transaction system is based on the append-only nature
/// of its core files. This exposes the necessary methods to safely write to
/// the different core datastructures.
pub trait Transaction {
    /// Record the state of an append-only file before update
    fn add(&mut self, file: impl AsRef<Path>, offset: usize);

    // TODO the rest of the methods once we do more in Rust.
}