MCPcopy Create free account
hub / github.com/ddimaria/rust-blockchain-tutorial / deserialize

Function deserialize

chain/src/helpers.rs:20–25  ·  view source on GitHub ↗
(value: &[u8])

Source from the content-addressed store, hash-verified

18}
19
20pub(crate) fn deserialize<V: DeserializeOwned>(value: &[u8]) -> Result<V> {
21 let deserialized =
22 bincode::deserialize::<V>(value).map_err(|e| DeserializeError(e.to_string()))?;
23
24 Ok(deserialized)
25}
26
27// #[cfg(test)]
28#[allow(unused)]

Callers 4

try_intoMethod · 0.85
get_accountMethod · 0.85
send_raw_transactionMethod · 0.85
process_transactionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected