pub struct NoCache;Expand description
No-op cache implementation for when caching is disabled.
All operations are no-ops. This is the default for small files where caching overhead exceeds benefit.
Trait Implementations§
Source§impl ParseCache for NoCache
impl ParseCache for NoCache
Source§fn get(&self, _frame_number: u64) -> Option<Arc<CachedParse>>
fn get(&self, _frame_number: u64) -> Option<Arc<CachedParse>>
Get cached parse result for a frame, if available.
Source§fn reader_passed(&self, _reader_id: usize, _frame_number: u64)
fn reader_passed(&self, _reader_id: usize, _frame_number: u64)
Hint that a reader has finished with frames up to this number. Read more
Source§fn register_reader(&self) -> usize
fn register_reader(&self) -> usize
Register a new reader and get its ID.
Source§fn unregister_reader(&self, _reader_id: usize)
fn unregister_reader(&self, _reader_id: usize)
Unregister a reader (e.g., when stream completes).
Source§fn get_or_insert_with(
&self,
frame_number: u64,
f: Box<dyn FnOnce() -> Arc<CachedParse> + '_>,
) -> (Arc<CachedParse>, bool)
fn get_or_insert_with( &self, frame_number: u64, f: Box<dyn FnOnce() -> Arc<CachedParse> + '_>, ) -> (Arc<CachedParse>, bool)
Get cached result or compute and cache it. Returns (result, was_hit).
Source§fn stats(&self) -> Option<CacheStats>
fn stats(&self) -> Option<CacheStats>
Get cache statistics (if available).
Source§fn reset_stats(&self)
fn reset_stats(&self)
Reset statistics counters. Default implementation does nothing.
Auto Trait Implementations§
impl Freeze for NoCache
impl RefUnwindSafe for NoCache
impl Send for NoCache
impl Sync for NoCache
impl Unpin for NoCache
impl UnwindSafe for NoCache
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