use std::any::Any;
use std::fmt::Debug;
use std::hash::Hash;
pub mod lru;
pub type CachePolicyPutResult<K, V> = (Option<V>, Vec<(K, V)>);
pub trait CachePolicy: Debug + Send + 'static {
type K: Clone + Eq + Hash + Ord + Debug + Send + 'static;
type V: Clone + Debug + Send + 'static;
fn get(&mut self, k: &Self::K) -> Option<Self::V>;
fn peek(&mut self, k: &Self::K) -> Option<Self::V>;
fn put(&mut self, k: Self::K, v: Self::V) -> CachePolicyPutResult<Self::K, Self::V>;
fn remove(&mut self, k: &Self::K) -> Option<Self::V>;
fn pop(&mut self) -> Option<(Self::K, Self::V)>;
fn as_any(&self) -> &dyn Any;
}