MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / extract

Method extract

crates/commitlog/src/commit.rs:367–369  ·  view source on GitHub ↗

Extract the [`Metadata`] of a single [`StoredCommit`] from the given reader. Note that this decodes the commit due to checksum verification. Like [`StoredCommit::decode`], this method returns `None` if the reader is at EOF already.

(reader: R)

Source from the content-addressed store, hash-verified

365 /// Like [`StoredCommit::decode`], this method returns `None` if the reader
366 /// is at EOF already.
367 pub fn extract<R: io::Read>(reader: R) -> io::Result<Option<Self>> {
368 StoredCommit::decode(reader).map(|maybe_commit| maybe_commit.map(Self::from))
369 }
370}
371
372impl From<StoredCommit> for Metadata {

Callers 1

download_and_installFunction · 0.45

Calls 2

decodeFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected