MCPcopy Create free account
hub / github.com/RetypeOS/parcode / decode

Method decode

src/reader.rs:903–908  ·  view source on GitHub ↗

Standard single-threaded deserialization. Use this for leaf nodes or simple structs that fit in memory.

(&self)

Source from the content-addressed store, hash-verified

901 /// Standard single-threaded deserialization.
902 /// Use this for leaf nodes or simple structs that fit in memory.
903 pub fn decode<T: DeserializeOwned>(&self) -> Result<T> {
904 let payload = self.read_raw()?;
905 bincode::serde::decode_from_slice(&payload, bincode::config::standard())
906 .map(|(obj, _)| obj)
907 .map_err(|e| ParcodeError::Serialization(e.to_string()))
908 }
909
910 /// **Parallel Shard Reconstruction**
911 ///

Callers 3

loadMethod · 0.80
from_nodeMethod · 0.80
test_nested_structuresFunction · 0.80

Calls 1

read_rawMethod · 0.80

Tested by 1

test_nested_structuresFunction · 0.64