mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-27 01:54:47 -07:00
global: snapshot
This commit is contained in:
@@ -15,6 +15,10 @@ use crate::{Error, Result};
|
||||
pub struct Version(u32);
|
||||
|
||||
impl Version {
|
||||
pub const ZERO: Self = Self(0);
|
||||
pub const ONE: Self = Self(1);
|
||||
pub const TWO: Self = Self(2);
|
||||
|
||||
pub fn write(&self, path: &Path) -> Result<(), io::Error> {
|
||||
fs::write(path, self.as_bytes())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user