Skip to main content

Cache

Trait Cache 

Source
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§

Source

fn get(&self, key: &str) -> Option<Vec<u8>>

Source

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".

Implementors§