zerostash_files/
lib.rs

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
#[macro_use]
extern crate serde_derive;

use infinitree::*;
pub mod tree;
pub use tree::*;
mod files;
pub use files::*;
mod zfs_snapshots;
pub use zfs_snapshots::*;
pub mod rollsum;
pub mod splitter;
mod stash;

pub use stash::list_snapshots::ZfsSnapshotList;
pub use stash::restore;
pub use stash::store;

type ChunkIndex = fields::VersionedMap<Digest, ChunkPointer>;
type FileIndex = fields::VersionedMap<String, Entry>;
type ZfsIndex = fields::VersionedMap<String, ZfsSnapshot>;

#[derive(Clone, Default, Index)]
pub struct Files {
    pub chunks: ChunkIndex,
    pub files: FileIndex,
    pub zfs_snapshots: ZfsIndex,
    pub tree: Tree,
}