Skip to main content

EntryMetadata

Trait EntryMetadata 

Source
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§

Source

fn execution_time_ms(&self) -> Option<u64>

Get execution time in milliseconds if applicable

Source

fn size_bytes(&self) -> Option<u64>

Get the size of the cached data if applicable

Source

fn category(&self) -> Option<&str>

Get a category or type identifier

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§

Source§

impl EntryMetadata for ()

Empty metadata implementation

Implementors§