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

Method deserialize

cranelift/codegen/src/ir/function.rs:49–62  ·  view source on GitHub ↗
(deserializer: D)

Source from the content-addressed store, hash-verified

47#[cfg(feature = "enable-serde")]
48impl<'de> Deserialize<'de> for VersionMarker {
49 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
50 where
51 D: Deserializer<'de>,
52 {
53 let version = String::deserialize(deserializer)?;
54 if version != crate::VERSION {
55 return Err(D::Error::custom(&format!(
56 "Expected a clif ir function for version {}, found one for version {}",
57 crate::VERSION,
58 version,
59 )));
60 }
61 Ok(VersionMarker)
62 }
63}
64
65/// Function parameters used when creating this function, and that will become applied after

Callers

nothing calls this directly

Calls 2

OkFunction · 0.85
deserializeFunction · 0.50

Tested by

no test coverage detected