Skip to main content

CacheStore

Trait CacheStore 

Source
pub trait CacheStore {
    // Required methods
    fn cache(&mut self, nid: NodeId, address: i64, length: i64, data: &[u8]);
    fn get_cache(&self, nid: NodeId, address: i64, length: i64) -> Option<&[u8]>;
    fn invalidate_by(&mut self, nid: NodeId);
    fn invalidate_of(&mut self, nid: NodeId);
    fn clear(&mut self);
}

Required Methods§

Source

fn cache(&mut self, nid: NodeId, address: i64, length: i64, data: &[u8])

Source

fn get_cache(&self, nid: NodeId, address: i64, length: i64) -> Option<&[u8]>

Source

fn invalidate_by(&mut self, nid: NodeId)

Source

fn invalidate_of(&mut self, nid: NodeId)

Source

fn clear(&mut self)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, T> CacheStore for &'a mut T
where T: 'a + CacheStore + ?Sized,

Source§

fn cache(&mut self, nid: NodeId, address: i64, length: i64, data: &[u8])

Source§

fn get_cache(&self, nid: NodeId, address: i64, length: i64) -> Option<&[u8]>

Source§

fn invalidate_by(&mut self, nid: NodeId)

Source§

fn invalidate_of(&mut self, nid: NodeId)

Source§

fn clear(&mut self)

Source§

impl<T> CacheStore for Box<T>
where T: CacheStore + ?Sized,

Source§

fn cache(&mut self, nid: NodeId, address: i64, length: i64, data: &[u8])

Source§

fn get_cache(&self, nid: NodeId, address: i64, length: i64) -> Option<&[u8]>

Source§

fn invalidate_by(&mut self, nid: NodeId)

Source§

fn invalidate_of(&mut self, nid: NodeId)

Source§

fn clear(&mut self)

Implementors§