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

Method write

crates/commitlog/src/segment.rs:40–45  ·  view source on GitHub ↗
(&self, mut out: W)

Source from the content-addressed store, hash-verified

38 pub const LEN: usize = MAGIC.len() + /* log_format_version + checksum_algorithm + reserved + reserved */ 4;
39
40 pub fn write<W: io::Write>(&self, mut out: W) -> io::Result<()> {
41 out.write_all(&MAGIC)?;
42 out.write_all(&[self.log_format_version, self.checksum_algorithm, 0, 0])?;
43
44 Ok(())
45 }
46
47 pub fn decode<R: io::Read>(mut read: R) -> io::Result<Self> {
48 let mut buf = [0; Self::LEN];

Callers 2

commitMethod · 0.45
header_roundtripFunction · 0.45

Calls 1

OkFunction · 0.50

Tested by 1

header_roundtripFunction · 0.36