pub trait FromRead {
// Required method
fn copy_from_read(&mut self, reader: &mut dyn Read) -> Result<()>;
}Expand description
This trait can be used by all structs that can be serialized to a Read.
I would not recommend using this if you have control over the serialization and only want to use this for rust<->rust serialization. Serde is better for this purpose. This is useful for use cases where precise control of how the data is read is required.
Example: Image Decoding, Network Packet decoding,…