[−][src]Function rscache::util::load_store
pub fn load_store<S: Store, P: AsRef<Path>>(path: P) -> Result<S>
Loads the given store.
This will load the main cache file and open the chosen store with it.
Errors
Returns an std::io::Error
if the path is incorrect.
Examples
use rscache::{ Store, util }; let store: CustomStore = util::load_store("./data/cache")?; struct CustomStore; impl Store for CustomStore { fn new(mut main_file: File) -> rscache::Result<Self> { // snip Ok(Self { }) } }