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

Function header_roundtrip

crates/commitlog/src/segment.rs:771–782  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

769
770 #[test]
771 fn header_roundtrip() {
772 let hdr = Header {
773 log_format_version: 42,
774 checksum_algorithm: 7,
775 };
776
777 let mut buf = [0u8; Header::LEN];
778 hdr.write(&mut &mut buf[..]).unwrap();
779 let h2 = Header::decode(&buf[..]).unwrap();
780
781 assert_eq!(hdr, h2);
782 }
783
784 #[test]
785 fn write_read_roundtrip() {

Callers

nothing calls this directly

Calls 3

decodeFunction · 0.85
unwrapMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…