pub trait EntryMetadata:
Serialize
+ for<'de> Deserialize<'de>
+ Clone
+ Send
+ Sync
+ 'static {
// Provided methods
fn execution_time_ms(&self) -> Option<u64> { ... }
fn size_bytes(&self) -> Option<u64> { ... }
fn category(&self) -> Option<&str> { ... }
}Expand description
Trait for cache entry metadata
Provided Methods§
Sourcefn execution_time_ms(&self) -> Option<u64>
fn execution_time_ms(&self) -> Option<u64>
Get execution time in milliseconds if applicable
Sourcefn size_bytes(&self) -> Option<u64>
fn size_bytes(&self) -> Option<u64>
Get the size of the cached data if applicable
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
impl EntryMetadata for ()
Empty metadata implementation