Merge pull request #1109 from matthiasbeyer/libimagentryref/all-references
Add RefStore::all_references()
This commit is contained in:
commit
894604e5af
1 changed files with 7 additions and 0 deletions
|
@ -24,6 +24,7 @@ use std::fs::File;
|
||||||
use libimagstore::store::FileLockEntry;
|
use libimagstore::store::FileLockEntry;
|
||||||
use libimagstore::storeid::StoreId;
|
use libimagstore::storeid::StoreId;
|
||||||
use libimagstore::storeid::IntoStoreId;
|
use libimagstore::storeid::IntoStoreId;
|
||||||
|
use libimagstore::storeid::StoreIdIterator;
|
||||||
use libimagstore::store::Store;
|
use libimagstore::store::Store;
|
||||||
|
|
||||||
use toml::Value;
|
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)
|
fn create_with_hasher<'a, H: Hasher>(&'a self, pb: PathBuf, flags: RefFlags, h: H)
|
||||||
-> Result<FileLockEntry<'a>>;
|
-> Result<FileLockEntry<'a>>;
|
||||||
|
|
||||||
|
/// Get all reference objects
|
||||||
|
fn all_references(&self) -> Result<StoreIdIterator>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RefStore for Store {
|
impl RefStore for Store {
|
||||||
|
@ -259,5 +263,8 @@ impl RefStore for Store {
|
||||||
Ok(fle)
|
Ok(fle)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn all_references(&self) -> Result<StoreIdIterator> {
|
||||||
|
self.retrieve_for_module("ref").map_err(From::from)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue