cranelift_codegen::incremental_cache

Trait CacheKvStore

Source
pub trait CacheKvStore {
    // Required methods
    fn get(&self, key: &[u8]) -> Option<Cow<'_, [u8]>>;
    fn insert(&mut self, key: &[u8], val: Vec<u8>);
}
Available on crate feature incremental-cache only.
Expand description

Backing storage for an incremental compilation cache, when enabled.

Required Methods§

Source

fn get(&self, key: &[u8]) -> Option<Cow<'_, [u8]>>

Given a cache key hash, retrieves the associated opaque serialized data.

Source

fn insert(&mut self, key: &[u8], val: Vec<u8>)

Given a new cache key and a serialized blob obtained from serialize_compiled, stores it in the cache store.

Implementors§