diff --git a/lib/entry/libimagentryref/src/refstore.rs b/lib/entry/libimagentryref/src/refstore.rs index 3eb97481..e992a9b3 100644 --- a/lib/entry/libimagentryref/src/refstore.rs +++ b/lib/entry/libimagentryref/src/refstore.rs @@ -24,6 +24,7 @@ use std::fs::File; use libimagstore::store::FileLockEntry; use libimagstore::storeid::StoreId; use libimagstore::storeid::IntoStoreId; +use libimagstore::storeid::StoreIdIterator; use libimagstore::store::Store; use toml::Value; @@ -61,6 +62,9 @@ pub trait RefStore { fn create_with_hasher<'a, H: Hasher>(&'a self, pb: PathBuf, flags: RefFlags, h: H) -> Result>; + /// Get all reference objects + fn all_references(&self) -> Result; + } impl RefStore for Store { @@ -259,5 +263,8 @@ impl RefStore for Store { Ok(fle) } + fn all_references(&self) -> Result { + self.retrieve_for_module("ref").map_err(From::from) + } }