From cb2c512440f81fc1339acf836581a96400d6539b Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 27 Dec 2015 23:03:57 +0100 Subject: [PATCH] Add Store type --- src/storage/mod.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/storage/mod.rs b/src/storage/mod.rs index e51307df..16fbe4f6 100644 --- a/src/storage/mod.rs +++ b/src/storage/mod.rs @@ -1,4 +1,26 @@ +use std::cell::RefCell; +use std::collections::HashMap; + pub mod path; pub mod file; pub mod parser; pub mod json; + +use storage::file::File; +use storage::file::id::FileID; + +type Cache<'a> = HashMap>>; + +pub struct Store<'a> { + cache : RefCell>, +} + +impl<'a> Store<'a> { + + pub fn new() -> Store<'a> { + Store { + cache: RefCell::new(HashMap::new()), + } + } + +}