Loads cache configuration specified at `path`. This method will read the file specified by `path` on the filesystem and attempt to load cache configuration from it. This method can also fail due to I/O errors, misconfiguration, syntax errors, etc. For expected syntax in the configuration file see the [documentation online][docs]. Passing in `None` loads cache configuration from the system defaul
(config_file: Option<&Path>)
| 338 | /// |
| 339 | /// [docs]: https://bytecodealliance.github.io/wasmtime/cli-cache.html |
| 340 | pub fn from_file(config_file: Option<&Path>) -> Result<Self> { |
| 341 | let mut config = Self::load_and_parse_file(config_file)?; |
| 342 | config.validate()?; |
| 343 | Ok(config) |
| 344 | } |
| 345 | |
| 346 | fn load_and_parse_file(config_file: Option<&Path>) -> Result<Self> { |
| 347 | // get config file path |