diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-10-28 13:49:46 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-10-28 13:49:52 +0100 |
commit | 9cbe616c7ce4404e642709648bd7c97a4e849040 (patch) | |
tree | 17f2ab59b4935a72e468427b6ef860532658c133 /src/filestore/staging.rs | |
parent | 6b6a6640ffd579ccf1b7f5b90dd788fb3317ff2d (diff) |
Implement file store abstraction
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/filestore/staging.rs')
-rw-r--r-- | src/filestore/staging.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/filestore/staging.rs b/src/filestore/staging.rs new file mode 100644 index 0000000..6ef8cea --- /dev/null +++ b/src/filestore/staging.rs @@ -0,0 +1,15 @@ +use std::path::Path; +use std::path::PathBuf; +use anyhow::Result; + +use crate::filestore::util::FileStoreImpl; + +// The implementation of this type must be available in the merged filestore. +pub struct StagingStore(pub (in crate::filestore) FileStoreImpl); + +impl StagingStore { + pub fn load(root: &Path) -> Result<Self> { + FileStoreImpl::load(root).map(StagingStore) + } +} + |