(cache_path: PathBuf)
| 105 | |
| 106 | impl ModelsRegistry { |
| 107 | pub fn new(cache_path: PathBuf) -> Self { |
| 108 | Self { |
| 109 | data: Arc::new(RwLock::new(None)), |
| 110 | cache_path, |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | pub async fn get(&self) -> ModelsData { |
| 115 | let data = self.data.read().await; |