Read a provenance graph from a reader (e.g., a file).
(reader: &mut R)
| 360 | |
| 361 | /// Read a provenance graph from a reader (e.g., a file). |
| 362 | pub fn read_from<R: Read>(reader: &mut R) -> Result<(Self, Hash), ProvenanceGraphError> { |
| 363 | let mut data = Vec::new(); |
| 364 | reader |
| 365 | .read_to_end(&mut data) |
| 366 | .map_err(ProvenanceGraphError::Io)?; |
| 367 | Self::deserialize(&data) |
| 368 | } |
| 369 | |
| 370 | /// Write a provenance graph to a writer (e.g., a file). |
| 371 | pub fn write_to<W: Write>(&self, writer: &mut W) -> Result<Hash, ProvenanceGraphError> { |
nothing calls this directly
no test coverage detected