diff --git a/libimagstore/src/fsstore.rs b/libimagstore/src/fsstore.rs index 2bea1a58..c068f7bd 100644 --- a/libimagstore/src/fsstore.rs +++ b/libimagstore/src/fsstore.rs @@ -8,6 +8,7 @@ use std::sync::RwLock; pub use store::Store; pub use store::Result; +pub use store::FileLockEntry; pub use entry::Entry; pub use error::StoreError; @@ -44,7 +45,7 @@ impl Store for FSStore { unimplemented!() } - fn retrieve(&self, path: PathBuf) -> Result>> { + fn retrieve<'a>(&'a self, path: PathBuf) -> Result> { unimplemented!() } @@ -52,7 +53,7 @@ impl Store for FSStore { unimplemented!() } - fn update(&self, entry: Arc>) -> Result<()> { + fn update<'a>(&'a self, entry: FileLockEntry<'a, Self>) -> Result<()> { unimplemented!() } diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index e1428cc4..eaf90d71 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -11,13 +11,13 @@ pub use error::StoreError; pub type Result = RResult; -pub trait Store { +pub trait Store : Sized { fn location(&self) -> &PathBuf; fn create(&self, entry: Entry) -> Result<()>; - fn retrieve(&self, path: PathBuf) -> Result>>; - fn update(&self, entry: Arc>) -> Result<()>; + fn retrieve<'a>(&'a self, path: PathBuf) -> Result>; + fn update<'a>(&'a self, entry: FileLockEntry<'a, Self>) -> Result<()>; fn retrieve_copy(&self, id : String) -> Result; fn delete(&self, path: PathBuf) -> Result<()>;