Mercurial > public > mercurial-scm > hg
view rust/hg-core/src/transaction.rs @ 52300:04b9a56c2d25
rust-lib: only export very common types to the top of the crate
This was done very early in the Rust project's lifecycle and I had very little
Rust experience. Let's keep the `DirstateParents` since they'll pop up in
all higher-level code and make the rest more explicit imports to make the
imports less confusing and the lib less cluttered.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 04 Nov 2024 11:13:05 +0100 |
parents | e01e84e5e426 |
children |
line wrap: on
line source
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. }