pub struct FixedPointResidentGraphCache { /* private fields */ }Expand description
Backend-resident graph cache keyed by backend identity and normalized graph layout.
Implementations§
Source§impl FixedPointResidentGraphCache
impl FixedPointResidentGraphCache
Sourcepub fn with_max_retained_bytes(max_retained_bytes: usize) -> Self
pub fn with_max_retained_bytes(max_retained_bytes: usize) -> Self
Create a resident graph cache with a soft upper bound on retained bytes.
The newest graph is always retained so one oversized graph may exceed the limit; older least-recently-used entries are evicted first.
Sourcepub fn get_or_upload(
&mut self,
backend: &dyn VyreBackend,
graph: &FixedPointForwardGraph,
) -> Result<&FixedPointResidentGraph, BackendError>
pub fn get_or_upload( &mut self, backend: &dyn VyreBackend, graph: &FixedPointForwardGraph, ) -> Result<&FixedPointResidentGraph, BackendError>
Return a resident graph for graph, uploading it only on a cache miss.
Sourcepub fn stats(&self) -> FixedPointResidentGraphCacheStats
pub fn stats(&self) -> FixedPointResidentGraphCacheStats
Return point-in-time resident graph 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 graph 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.
Sourcepub fn free_all(
&mut self,
backend: &dyn VyreBackend,
) -> Result<(), BackendError>
pub fn free_all( &mut self, backend: &dyn VyreBackend, ) -> Result<(), BackendError>
Free every resident graph owned by this cache.
Trait Implementations§
Source§impl Clone for FixedPointResidentGraphCache
impl Clone for FixedPointResidentGraphCache
Source§fn clone(&self) -> FixedPointResidentGraphCache
fn clone(&self) -> FixedPointResidentGraphCache
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FixedPointResidentGraphCache
impl Debug for FixedPointResidentGraphCache
Source§impl Default for FixedPointResidentGraphCache
impl Default for FixedPointResidentGraphCache
Source§fn default() -> FixedPointResidentGraphCache
fn default() -> FixedPointResidentGraphCache
Returns the “default value” for a type. Read more
impl StructuralPartialEq for FixedPointResidentGraphCache
Auto Trait Implementations§
impl Freeze for FixedPointResidentGraphCache
impl RefUnwindSafe for FixedPointResidentGraphCache
impl Send for FixedPointResidentGraphCache
impl Sync for FixedPointResidentGraphCache
impl Unpin for FixedPointResidentGraphCache
impl UnsafeUnpin for FixedPointResidentGraphCache
impl UnwindSafe for FixedPointResidentGraphCache
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