(&self, content: &str)
| 84 | } |
| 85 | |
| 86 | pub fn path(&self, content: &str) -> PathBuf { |
| 87 | let id = utils::hash(content); |
| 88 | match self { |
| 89 | ContentType::File => PathBuf::from(content), |
| 90 | _ => PathBuf::from(ART_PATH).join(id).with_extension("svg"), |
| 91 | } |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | #[derive(Clone)] |