augr_core/
store.rs

1pub mod meta;
2pub mod patch;
3pub mod sync_folder_store;
4
5pub use sync_folder_store::{SyncFolderStore, SyncFolderStoreError};
6
7use self::meta::Meta;
8use self::patch::Patch;
9use crate::PatchRef;
10use std::error::Error;
11
12pub trait Store {
13    type Error: Error;
14
15    fn get_meta(&self) -> Result<Meta, Self::Error>;
16    fn save_meta(&mut self, meta: &Meta) -> Result<(), Self::Error>;
17    fn get_patch(&self, patch_ref: &PatchRef) -> Result<Patch, Self::Error>;
18    fn add_patch(&mut self, patch: &Patch) -> Result<(), Self::Error>;
19}