pub fn from_reader<T, R>(reader: R) -> Result<T, Error>
where T: DeserializeOwned, R: Read,
Expand description

Restores a previously Pot-serialized value from a Read implementer.

let mut serialized = Vec::new();
pot::to_writer(&"hello world", &mut serialized).unwrap();
let deserialized = pot::from_reader::<String, _>(&serialized[..]).unwrap();
assert_eq!(deserialized, "hello world");