Cache

Trait Cache 

Source
pub trait Cache<Memory: 'static + Clone>: Storage {
    // Required methods
    fn frame(&self) -> &Vec<Rc<RefCell<State<Memory>>>>;
    fn frame_mut(&mut self) -> &mut Vec<Rc<RefCell<State<Memory>>>>;
    fn memory(&self) -> Option<Memory>;

    // Provided method
    fn flush(&mut self) -> Option<()> { ... }
}
Expand description

Cache traits

Required Methods§

Source

fn frame(&self) -> &Vec<Rc<RefCell<State<Memory>>>>

Get frame

Source

fn frame_mut(&mut self) -> &mut Vec<Rc<RefCell<State<Memory>>>>

Get frame mut

Source

fn memory(&self) -> Option<Memory>

Memory

Provided Methods§

Source

fn flush(&mut self) -> Option<()>

(lifecycle) Flush data

Implementors§

Source§

impl<Memory: 'static + Clone> Cache<Memory> for Cache<Memory>