pub struct ResidentIfdsCsrCache<R> { /* private fields */ }Expand description
Backend-resident IFDS CSR cache keyed by normalized prepared layout.
Implementations§
Source§impl<R> ResidentIfdsCsrCache<R>where
R: Clone,
impl<R> ResidentIfdsCsrCache<R>where
R: Clone,
Sourcepub fn with_max_retained_bytes(max_retained_bytes: usize) -> Self
pub fn with_max_retained_bytes(max_retained_bytes: usize) -> Self
Create a cache with a soft upper bound on retained resident graph bytes.
The newest entry is always retained so one oversized graph may exceed the limit; older entries are evicted before uploading a cache miss.
Sourcepub fn get_or_upload<D>(
&mut self,
dispatch: &D,
prepared: &PreparedIfdsCsr,
) -> Result<&ResidentPreparedIfdsCsr<R>, String>where
D: IfdsResidentDispatch<Resource = R>,
pub fn get_or_upload<D>(
&mut self,
dispatch: &D,
prepared: &PreparedIfdsCsr,
) -> Result<&ResidentPreparedIfdsCsr<R>, String>where
D: IfdsResidentDispatch<Resource = R>,
Return a resident IFDS CSR for prepared, uploading on cache miss.
Sourcepub fn stats(&self) -> ResidentIfdsCsrCacheStats
pub fn stats(&self) -> ResidentIfdsCsrCacheStats
Return point-in-time cache counters.
Sourcepub fn resident_identities(&self) -> Vec<ResidentGraphCacheIdentity>
pub fn resident_identities(&self) -> Vec<ResidentGraphCacheIdentity>
Deterministic cache identity snapshot for diagnostics and release evidence.
Sourcepub fn miss_reason_for_identity(
&self,
requested: &ResidentGraphCacheIdentity,
) -> ResidentGraphCacheMissReason
pub fn miss_reason_for_identity( &self, requested: &ResidentGraphCacheIdentity, ) -> ResidentGraphCacheMissReason
Explain why requested would miss the current resident IFDS cache.
Sourcepub const fn last_miss_reason(&self) -> Option<ResidentGraphCacheMissReason>
pub const fn last_miss_reason(&self) -> Option<ResidentGraphCacheMissReason>
Reason attached to the most recent cache miss. Hits clear this field.
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for ResidentIfdsCsrCache<R>
impl<R> RefUnwindSafe for ResidentIfdsCsrCache<R>where
R: RefUnwindSafe,
impl<R> Send for ResidentIfdsCsrCache<R>where
R: Send,
impl<R> Sync for ResidentIfdsCsrCache<R>where
R: Sync,
impl<R> Unpin for ResidentIfdsCsrCache<R>where
R: Unpin,
impl<R> UnsafeUnpin for ResidentIfdsCsrCache<R>
impl<R> UnwindSafe for ResidentIfdsCsrCache<R>where
R: UnwindSafe,
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