Fix Backup/Restore API compilation errors

- chrono timestamp_opt API: use TimeZone trait method
- VfsError::Io/NotFound: use String literals
- SendFormat: add PartialEq derive
- VfsRaidConfig tests: add disk_paths field
- BackupStats test: use relative timestamps
- HashSet file tracking: use (String, u64) tuple
- BackupStream::receive: clone format before use
- collect_file_data: fix temporary lifetime

All tests pass: 495 markbase-core + 201 smb-server = 696 total
This commit is contained in:
Warren
2026-06-24 02:37:03 +08:00
parent 5f12e9f5d7
commit 1d9e140e6c
7 changed files with 1567 additions and 0 deletions

View File

@@ -47,6 +47,14 @@ impl VfsRaidBackend {
}
}
pub fn level(&self) -> VfsRaidLevel {
self.config.level.clone()
}
pub fn backends(&self) -> &[Box<dyn VfsBackend>] {
&self.backends
}
fn calculate_parity_p(data: &[u8]) -> Vec<u8> {
data.iter().fold(vec![0u8; data.len()], |mut p, byte| {
for i in 0..p.len() {