diff options
author | metamuffin <metamuffin@disroot.org> | 2025-03-27 20:01:22 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-03-27 20:01:22 +0100 |
commit | 18d48b8225e1a665cd97aae681a6b8d1d68fd57e (patch) | |
tree | 79116b7b9d7ba9fbfa113f556b20c2836c7cdfae /shared/src/store.rs | |
parent | 40afd6fa42ad937148c6812b8df8efff6c78e4b5 (diff) | |
download | weareserver-18d48b8225e1a665cd97aae681a6b8d1d68fd57e.tar weareserver-18d48b8225e1a665cd97aae681a6b8d1d68fd57e.tar.bz2 weareserver-18d48b8225e1a665cd97aae681a6b8d1d68fd57e.tar.zst |
graphics point
Diffstat (limited to 'shared/src/store.rs')
-rw-r--r-- | shared/src/store.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/shared/src/store.rs b/shared/src/store.rs index 61b5dee..960d641 100644 --- a/shared/src/store.rs +++ b/shared/src/store.rs @@ -185,6 +185,14 @@ impl ResourceStore { ResourceStore::Respack(r) => Ok(r.lock().unwrap().iter(cb)), } } + pub fn count(&self) -> Result<usize> { + match self { + ResourceStore::Redb(_database) => todo!(), + ResourceStore::Filesystem(_path) => todo!(), + ResourceStore::Memory(map) => Ok(map.lock().unwrap().len()), + ResourceStore::Respack(_pack) => todo!(), + } + } } pub fn resource_hash(x: &[u8]) -> [u8; 32] { |