pub fn read_shard<H: HashSer, R: Read>(reader: R) -> Result<PrunableTree<H>>
Available on crate feature
unstable-serialization
only.Expand description
Reads a [PrunableTree
] from the provided Read
instance.
This function operates by first parsing a 1-byte version identifier, and then dispatching to
the correct deserialization function for the observed version, or returns an
io::ErrorKind::InvalidData
error in the case that the version is not recognized.