MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / from_file

Method from_file

crates/cache/src/config.rs:340–344  ·  view source on GitHub ↗

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>)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

OkFunction · 0.85
validateMethod · 0.45

Tested by

no test coverage detected