blob: aaaebc956daf1a70edc8f452d07699c1d8e24a76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
use crate::specification::{Create, FileCount};
/// Test data management for Obnam benchmarks.
///
/// Each backup in a benchmark backs up some test data created for
/// that backup. That data is later cleaned up. Is all handled by this
/// structure.
#[derive(Debug)]
pub struct Data {}
/// Possible errors from managing data.
#[derive(Debug, thiserror::Error)]
pub enum DataError {
}
impl Data {
pub(crate) fn new() -> Result<Self, DataError> {
Ok(Self {})
}
pub(crate) fn create(&self, create: &Create) -> Result<(), DataError> {
println!("create {:?}", create);
Ok(())
}
pub(crate) fn rename(&self, count: &FileCount) -> Result<(), DataError> {
println!("rename {:?}", count);
Ok(())
}
pub(crate) fn delete(&self, count: &FileCount) -> Result<(), DataError> {
println!("delete {:?}", count);
Ok(())
}
}
|