Skip to main content

CacheKey

Trait CacheKey 

Source
pub trait CacheKey:
    Clone
    + Eq
    + Hash
    + Send
    + Sync
    + Debug {
    // Required methods
    fn size(&self) -> usize;
    fn table_ref(&self) -> Option<&TableReference>;
}
Expand description

Key type for entries stored in a Cache.

Required Methods§

Source

fn size(&self) -> usize

Size of the key in bytes, used for cache memory accounting.

Source

fn table_ref(&self) -> Option<&TableReference>

Table this key is associated with, or None if the key is not table-scoped.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl CacheKey for Path

Implementors§