pub trait KvBlobCache: Send + Sync {
// Required methods
fn get(&self, key: &str) -> Option<(Bytes, &'static str)>;
fn put(&self, key: &str, payload: Bytes);
fn contains(&self, key: &str) -> bool;
fn clear(&self);
// Provided method
fn remove(&self, _key: &str) -> bool { ... }
}Expand description
Sync-only cache surface used by WombatKVKvStore. Implementations
must be Send + Sync because the algorithm crate holds them behind
Arc<dyn KvBlobCache>.
Required Methods§
Sourcefn get(&self, key: &str) -> Option<(Bytes, &'static str)>
fn get(&self, key: &str) -> Option<(Bytes, &'static str)>
Sync read. Returns (bytes, op_label) on hit; op_label is a
short telemetry tag like "load_mmap" or "load_foyer_ram".
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".