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

Function decode_vm_config_with_fallback

dstack-attest/src/attestation.rs:131–139  ·  view source on GitHub ↗
(config: &str, fallback_config: &str)

Source from the content-addressed store, hash-verified

129}
130
131fn decode_vm_config_with_fallback(config: &str, fallback_config: &str) -> Result<VmConfig> {
132 let config = if config.is_empty() {
133 fallback_config
134 } else {
135 config
136 };
137 let config = if config.is_empty() { "{}" } else { config };
138 serde_json::from_str(config).context("Failed to parse vm config")
139}
140
141/// Attestation mode
142#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Encode, Decode, Serialize, Deserialize)]

Callers 1

decode_vm_configMethod · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected