#[derive(Default)]
pub struct Config {
pub cache_path: Option<String>,
}
impl Config {
pub fn new() -> Self {
Config { cache_path: None }
}
pub fn with_cache() -> Self {
Config::new().cache_path("cache".to_string())
}
pub fn cache_path(mut self, path: String) -> Self {
self.cache_path = Some(path);
self
}
pub fn get_cache_path(&self) -> &Option<String> {
&self.cache_path
}
}