rust/hg-core/src/transaction.rs
author Mitchell Kember <mkember@janestreet.com>
Thu, 16 Jan 2025 13:15:02 -0500
changeset 52760 94e2547e6f3d
parent 52160 e01e84e5e426
permissions -rw-r--r--
rust: move code from utils to utils::strings This moves string-related functions in hg::utils into the recently added hg::utils::strings module.

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.
}