Skip to main content

RuntimeCacheOwner

Trait RuntimeCacheOwner 

Source
pub trait RuntimeCacheOwner:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn cache_stats(&self) -> Result<CacheStats, CacheOwnerError>;
    fn clear_caches(&self) -> Result<(), CacheOwnerError>;
}
Expand description

Runtime-owned cache participant.

Required Methods§

Source

fn cache_stats(&self) -> Result<CacheStats, CacheOwnerError>

Return this owner’s current cache statistics.

§Errors

Returns CacheOwnerError when the owner cannot report stats.

Source

fn clear_caches(&self) -> Result<(), CacheOwnerError>

Clear this owner’s retained caches.

§Errors

Returns CacheOwnerError when the owner cannot clear its caches.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§