pub fn from_reader<T: DeserializeOwned, R: Read>(reader: R) -> Result<T, Error>Expand description
Deserializes the records of a reader.
This works like from_str: all records are
deserialized as a sequence. The reader is read to the end, it does not
need to be buffered. To read one record at a time use
DeserializerConfig::reader.
use std::collections::BTreeMap;
let rows: Vec<BTreeMap<String, u32>> =
deser_csv::from_reader(&b"a,b\n1,2\n"[..]).unwrap();
assert_eq!(rows[0]["b"], 2);