pub trait Cache {
// Required methods
fn get(&self, key: &str) -> Option<Vec<u8>>;
fn put(&mut self, key: String, value: Vec<u8>);
}Expand description
Cache contract. Keys are stable per-URL strings (see
crate::Source::cache_key).
Required Methods§
fn get(&self, key: &str) -> Option<Vec<u8>>
fn put(&mut self, key: String, value: Vec<u8>)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".