MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / load

Method load

crates/openshell-vfio/src/pci.rs:191–195  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

189
190impl PciBindState {
191 pub fn load(path: &Path) -> Result<Self, std::io::Error> {
192 let data = fs::read_to_string(path)?;
193 serde_json::from_str(&data)
194 .map_err(|e| std::io::Error::new(std::io::ErrorKind::InvalidData, e))
195 }
196
197 pub fn save(&self, path: &Path) -> Result<(), std::io::Error> {
198 let data = serde_json::to_string_pretty(self)

Callers 15

mainFunction · 0.45
sbom_to_csvFunction · 0.45
newMethod · 0.45
current_generationMethod · 0.45
handle_tcp_connectionFunction · 0.45
evaluate_opa_tcpFunction · 0.45
handle_forward_proxyFunction · 0.45
run_networkingFunction · 0.45
watch_sandboxMethod · 0.45
spawnFunction · 0.45

Calls

no outgoing calls

Tested by 1

watch_sandboxMethod · 0.36