pub struct MetaCache {
pub files_snapshot: Vec<(String, u64)>,
pub tag_counts: HashMap<String, u32>,
}Expand description
Cached tag counts across all .mps files for mps tags --all.
The snapshot records (filename, size_bytes) for every .mps file at the time
the cache was built. Before using the cache the caller should check
MetaCache::is_valid against the current file list; if any file was added,
removed, or changed in size the cache is stale.
Fields§
§files_snapshot: Vec<(String, u64)>Sorted list of (filename, file_size_bytes) at cache-build time.
tag_counts: HashMap<String, u32>Tag name → total occurrence count across all cached files.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MetaCache
impl<'de> Deserialize<'de> for MetaCache
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MetaCache
impl RefUnwindSafe for MetaCache
impl Send for MetaCache
impl Sync for MetaCache
impl Unpin for MetaCache
impl UnsafeUnpin for MetaCache
impl UnwindSafe for MetaCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more