Trait CacheKey

Source
pub trait CacheKey: RefUnwindSafe {
    // Required method
    fn hash_bytes(&self) -> &[u8] ;
}
Expand description

Trait for objects that can be used as part of a key for a cached object.

Required Methods§

Source

fn hash_bytes(&self) -> &[u8]

Get a byte representation of the object that will be fed into the hash.

Implementations on Foreign Types§

Source§

impl CacheKey for &str

Source§

fn hash_bytes(&self) -> &[u8]

Source§

impl CacheKey for &[u8]

Source§

fn hash_bytes(&self) -> &[u8]

Source§

impl CacheKey for i32

Source§

fn hash_bytes(&self) -> &[u8]

Source§

impl CacheKey for u32

Source§

fn hash_bytes(&self) -> &[u8]

Source§

impl CacheKey for Vec<u8>

Source§

fn hash_bytes(&self) -> &[u8]

Source§

impl CacheKey for Vec<u32>

Source§

fn hash_bytes(&self) -> &[u8]

Implementors§