##// END OF EJS Templates
rust-vfs: rename `open` to `open_write` and `open_read` to `open`...
rust-vfs: rename `open` to `open_write` and `open_read` to `open` `open` being read *and* write is surprising because it differs from the Rust stdlib where `std::fs::File::open` is read-only by default. More importantly, writing is more dangerous than reading, so let's make it more explicit.

File last commit:

r53056:44823c50 default
r53191:645d247d default
Show More
transaction.rs
11 lines | 422 B | application/rls-services+xml | RustLexer
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.
}