pub struct FetchResultCache { /* private fields */ }Expand description
Shared bounded in-memory cache of normalized fetch results.
Implementations§
Source§impl FetchResultCache
impl FetchResultCache
Sourcepub fn new(config: FetchCacheConfig) -> Self
pub fn new(config: FetchCacheConfig) -> Self
Creates an empty normalized-result cache.
Sourcepub fn stats(&self) -> FetchCacheStats
pub fn stats(&self) -> FetchCacheStats
Returns a non-sensitive occupancy snapshot after purging expired entries.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for FetchResultCache
impl RefUnwindSafe for FetchResultCache
impl Send for FetchResultCache
impl Sync for FetchResultCache
impl Unpin for FetchResultCache
impl UnsafeUnpin for FetchResultCache
impl UnwindSafe for FetchResultCache
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