(&self)
| 217 | } |
| 218 | |
| 219 | fn list_entries(&self) -> HashMap<Path, FileMetadataCacheEntry> { |
| 220 | let state = self.state.lock().unwrap(); |
| 221 | let mut entries = HashMap::<Path, FileMetadataCacheEntry>::new(); |
| 222 | |
| 223 | for (path, entry) in state.lru_queue.list_entries() { |
| 224 | entries.insert( |
| 225 | path.clone(), |
| 226 | FileMetadataCacheEntry { |
| 227 | object_meta: entry.meta.clone(), |
| 228 | size_bytes: entry.file_metadata.memory_size(), |
| 229 | hits: *state.cache_hits.get(path).expect("entry must exist"), |
| 230 | extra: entry.file_metadata.extra_info(), |
| 231 | }, |
| 232 | ); |
| 233 | } |
| 234 | |
| 235 | entries |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | #[cfg(test)] |
nothing calls this directly
no test coverage detected