pub trait CacheKey:
DynHash
+ DynEq
+ Debug
+ Send
+ Sync {
// Required methods
fn as_any(&self) -> &dyn Any;
fn type_name(&self) -> &'static str;
}Expand description
Trait for types that can serve as cache keys.
This trait combines object-safe hashing, equality, and debug formatting.
It is automatically implemented for all types that implement
Hash + Eq + Debug + Send + Sync + 'static.
§Object Safety
This trait is object-safe, allowing Arc<dyn CacheKey> to be used
in hash maps and other collections.