1use crate::ASSEMBLE_HOME;
4
5use std::ffi::OsStr;
6use std::ops::Deref;
7use std::path::{Path, PathBuf};
8
9pub struct AssembleCache {
11 path: PathBuf,
12}
13
14impl Default for AssembleCache {
15 fn default() -> Self {
18 Self {
19 path: ASSEMBLE_HOME.path().join("cache"),
20 }
21 }
22}
23
24impl AsRef<Path> for AssembleCache {
25 fn as_ref(&self) -> &Path {
26 self.path.as_path()
27 }
28}
29
30impl AsRef<OsStr> for AssembleCache {
31 fn as_ref(&self) -> &OsStr {
32 self.path.as_os_str()
33 }
34}
35
36impl Deref for AssembleCache {
37 type Target = Path;
38
39 fn deref(&self) -> &Self::Target {
40 self.as_ref()
41 }
42}