feat: [#1932] l-s v0.5.1 原子写入保护及文档更新

This commit is contained in:
2026-05-08 00:18:30 +08:00
parent e821dcab14
commit 30186c23fb
8 changed files with 193 additions and 95 deletions
+10 -2
View File
@@ -32,7 +32,11 @@ pub struct FileMeta {
}
impl FileMeta {
pub fn from_path_with_callback<F1, F2>(path: &Path, mut on_bytes_read: F1, mut on_iop: F2) -> Result<Self>
pub fn from_path_with_callback<F1, F2>(
path: &Path,
mut on_bytes_read: F1,
mut on_iop: F2,
) -> Result<Self>
where
F1: FnMut(u64),
F2: FnMut(),
@@ -120,7 +124,11 @@ impl FileMeta {
}
}
pub fn calc_xxh128_with_callback<F1, F2>(path: &Path, mut on_bytes_read: F1, mut on_iop: F2) -> Result<String>
pub fn calc_xxh128_with_callback<F1, F2>(
path: &Path,
mut on_bytes_read: F1,
mut on_iop: F2,
) -> Result<String>
where
F1: FnMut(u64),
F2: FnMut(),