MCPcopy Create free account
hub / github.com/RustCrypto/utils / deserialize

Function deserialize

wycheproof2blb/src/wycheproof.rs:71–78  ·  view source on GitHub ↗
(
        deserializer: D,
    )

Source from the content-addressed store, hash-verified

69 //! Manual JSON deserialization implementation for hex strings.
70 use serde::Deserialize;
71 pub fn deserialize<'de, D: serde::Deserializer<'de>>(
72 deserializer: D,
73 ) -> Result<Vec<u8>, D::Error> {
74 let s = String::deserialize(deserializer)?;
75 ::hex::decode(&s).map_err(|_e| {
76 serde::de::Error::invalid_value(serde::de::Unexpected::Str(&s), &"hex data expected")
77 })
78 }
79}
80
81pub mod case_result {

Callers 4

test_eager_serializeFunction · 0.85
test_lazy_serializeFunction · 0.85
test_read_serializeFunction · 0.85
deserializeMethod · 0.85

Calls 2

decodeFunction · 0.50
as_refMethod · 0.45

Tested by 3

test_eager_serializeFunction · 0.68
test_lazy_serializeFunction · 0.68
test_read_serializeFunction · 0.68