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

Function deserialize

crates/environ/src/component/types.rs:967–977  ·  view source on GitHub ↗
(deser: D)

Source from the content-addressed store, hash-verified

965 }
966
967 pub fn deserialize<'de, D>(deser: D) -> Result<DiscriminantSize, D::Error>
968 where
969 D: Deserializer<'de>,
970 {
971 match u32::deserialize(deser)? {
972 1 => Ok(DiscriminantSize::Size1),
973 2 => Ok(DiscriminantSize::Size2),
974 4 => Ok(DiscriminantSize::Size4),
975 _ => Err(D::Error::custom("invalid discriminant size")),
976 }
977 }
978}
979
980/// Shape of a "record" type in interface types.

Callers 15

deserializeMethod · 0.70
deserializeMethod · 0.50
get_data_rawMethod · 0.50
make_componentFunction · 0.50
wasm_module_deserializeFunction · 0.50
TESTFunction · 0.50
TESTFunction · 0.50
deserialize_boxed_sliceFunction · 0.50

Calls 1

OkFunction · 0.85

Tested by 15

make_componentFunction · 0.40
TESTFunction · 0.40
TESTFunction · 0.40
func_callFunction · 0.40
func_call_asyncFunction · 0.40
typed_func_call_asyncFunction · 0.40
func_typedFunction · 0.40