MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / read_from

Method read_from

atomic-core/src/change/provenance_graph/mod.rs:362–368  ·  view source on GitHub ↗

Read a provenance graph from a reader (e.g., a file).

(reader: &mut R)

Source from the content-addressed store, hash-verified

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> {

Callers

nothing calls this directly

Calls 1

deserializeFunction · 0.50

Tested by

no test coverage detected