1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
use super::super::super::common_types::*;
use std::slice::Iter;

pub type ErrorStr = &'static str;
pub type HistoryCacheResult = Result<(),ErrorStr>;

pub trait HistoryCacheTrait {
    fn new() -> Self;
    fn add_change(&mut self, change: &CacheChange) -> HistoryCacheResult;
    fn remove_change(&mut self, change: &CacheChange) -> HistoryCacheResult;
    fn get_seq_num_min(&self) -> Option<SequenceNumber>;
    fn get_seq_num_max(&self) -> Option<SequenceNumber>;
    fn iter(&self) -> Iter<CacheChange>;
}