mod boolean;
mod map;
mod option;
mod singleton;
pub use self::boolean::BooleanStorage;
pub use self::map::MapStorage;
pub use self::option::OptionStorage;
pub use self::singleton::SingletonStorage;
pub trait Storage<K, V>: Default {
type Iter: Clone + Iterator<Item = (K, *const V)>;
type IterMut: Iterator<Item = (K, *mut V)>;
fn insert(&mut self, key: K, value: V) -> Option<V>;
fn get(&self, key: K) -> Option<&V>;
fn get_mut(&mut self, key: K) -> Option<&mut V>;
fn remove(&mut self, key: K) -> Option<V>;
fn clear(&mut self);
fn iter(&self) -> Self::Iter;
fn iter_mut(&mut self) -> Self::IterMut;
}