MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / load

Method load

vmm/src/app/image.rs:52–57  ·  view source on GitHub ↗
(filename: impl AsRef<Path>)

Source from the content-addressed store, hash-verified

50
51impl ImageInfo {
52 pub fn load(filename: impl AsRef<Path>) -> Result<Self> {
53 let file = fs::File::open(filename.as_ref()).context("failed to open image info")?;
54 let info: ImageInfo =
55 serde_json::from_reader(file).context("failed to parse image info")?;
56 Ok(info)
57 }
58}
59
60#[derive(Debug)]

Callers 3

load_configFunction · 0.45
discover_vmm_instancesFunction · 0.45
load_whitelistFunction · 0.45

Calls 4

guess_versionFunction · 0.85
ensure_existsMethod · 0.80
as_refMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected